Hi,
I am trying to output the query results to an excel file on the LAN.
I get a usage error message as follows when I try this statement through the QA. I don't know what parameters/Arguments I am missing.
usage: bcp {dbtable | query} {in | out | queryout | format} datafile
This is the statement I am using
exec master..xp_cmdshell 'bcp "select * from Database.tableName" queryout
\\UNCPath.xls -c -S ServerName -T'
Any help is greatly appreciated
KR