I am trying to export results from a temporary table to a .csv file and recieve the following error -
SQLState = S0002, NativeError = 208
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '#TOWNNEWS'.
Here is my bcp command line -
EXEC master.dbo.xp_cmdshell 'bcp #TOWNNEWS out C:\Subscribers.csv -c -S **** -U sa -P *******'
Can someone please help me out?