Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

I keep getting this error when doing a bcp export, why?

$
0
0

SQLState = S0002, NativeError = 208
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'SGMH_Reports.dbo.sp_RadLog'.
SQLState = 37000, NativeError = 8180
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared.
NULL

QUERY:

set @FileName =Convert(varchar(2),DatePart(MM,@EndDate))+'_'+
              Convert(varchar(2),DatePart(DD,@EndDate))+'_'+
              Convert(varchar(4),DatePart(YYYY,@EndDate))
Set @FileLoc = '\\sangorbandc02\data\FTPResend\RADADT\'
--Set @FileLoc = '\\it-dba\C$\TestFiles\'
Set @Command = 'bcp "Select * from SGMH_Reports.dbo.sp_RadLog" queryout "'+
                RTrim(LTrim(@FileLoc))+'\ADT_'+@FileName+'.txt" -T -c -t^|'
print @Command


YFLORES


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>