The following command works if I sub a 'table name' for the query and 'out' for queryout':
execute master..xp_cmdshell "bcp " Select Time1, Time2, Forced From in_tblname" queryout d:\transfer\test.txt -c -q -t,"
I am getting this error:
"Incorrect syntax near ' queryout d:\transfer\test.txt -c -q -t,'.
"
Can anyone spot the problem?
execute master..xp_cmdshell "bcp " Select Time1, Time2, Forced From in_tblname" queryout d:\transfer\test.txt -c -q -t,"
I am getting this error:
"Incorrect syntax near ' queryout d:\transfer\test.txt -c -q -t,'.
"
Can anyone spot the problem?