本文介绍了如何编写bcp命令在sql中创建头列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
exec master..xp_cmdshell 'BCP "select ''''empcode'''',''''fsname'''',''''ntype'''',''''desg'''',''''userid'''',''''dcr_count''''" queryout "d:\header.csv" -c -T -t'
,当我执行上述查询时,我会收到错误..我已经在下面进行了...请帮助我...
when i execute the above query i would get error..i have mentioed below..please help me out..
SQLState = 37000, NativeError = 102
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ''.
SQLState = 37000, NativeError = 8180
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared.
NULL
推荐答案
exec master..xp_cmdshell 'BCP ''select ''''empcode'''',''''fsname'''',''''ntype'''',''''desg'''',''''userid'''',''''dcr_count'''''' queryout ''d:\header.csv'' -c -T -t'
这篇关于如何编写bcp命令在sql中创建头列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!