I am using a BCP to write out information. The problem I am having is that when I go to write out the information I get the error
Incorrect syntax near 'outdated'.
I know I have my sytax wrong, can someone tell me were?
Set @script = 'BCP "SELECT distinct docsdb.dbo.vtab0010.val, docsdb.dbo.vtab0010.modified FROM docsdb.dbo.vtab0010, docsdb.dbo.temp where docsdb.dbo.vtab0010.val = docsdb.dbo.temp.val and docsdb.dbo.temp.pdate < docsdb.dbo.vtab0010.modified and docsdb.dbo.temp.problem = 'outdated' " queryout c:\' + @TabName + '.txt -U sa -P cfds -S -c'