【发布时间】:2018-04-15 21:48:31
【问题描述】:
我想将数据从选择查询到 txt 或 csv 格式,在 sql server 2008 中用逗号分隔
【问题讨论】:
-
@YogeshSharma SET bcpCommand = 'bcp "select * from table_name" queryout ' SET FilePath = 'C:\file\bcp\' SET OutputFile = 'new.txt' SET bcpCommand = bcpCommand + FilePath + OutputFile + ' -S servername -U username -P password' exec master..xp_cmdshell bcpCommand Error = [Microsoft][SQL Server Native Client 10.0]Unable to open BCP host data-file at the rate im missing 因为它被认为是用户...
-
使用这篇文章,解释 BCP 命令stackoverflow.com/questions/44606889/…
标签: sql sql-server sql-server-2008 sql-server-2005 sql-server-2008-r2