bcp的问题
看这个
EXEC master..xp_cmdshell 'BCP "SELECT * FROM kingdeeoa..person_diary where substring(diary_date,1,4)= '2007 ' and substring(diary_date,6,2)= '08 ' and substring(diary_date,9,2)= '09 ' " queryout "d:\tt.txt " -c -t ,-Usa -P '
这几个参数(2007,08,09 )的前后引号( ' ')怎么处理, 'BCP前和末尾-P '有引号 ',具体改怎么写撒
EXEC master..xp_cmdshell 'BCP "SELECT top 10 * FROM kingdeeoa..person_diary " queryout "d:\tt.txt " -c -t ,-Usa -P '
象这种就不存在以上问题
------解决方案--------------------EXEC master..xp_cmdshell 'BCP "SELECT * FROM kingdeeoa..person_diary where substring(diary_date,1,4)= ' '2007 ' ' and substring(diary_date,6,2)= ' '08 ' ' and substring(diary_date,9,2)= ' '09 ' ' " queryout "d:\tt.txt " -c -t ,-Usa -P '