FatalExceptionError
Technical User
I have the following statement in Query analyzer
Code:
declare @file_name varchar(255)
declare @current_date_time varchar(255)
select @current_date_time = REPLACE(CAST(GETDATE() as VARCHAR),' ','_')
set @file_name = 'C:\'+ @current_date_time + '.txt'
select @file_name as 'filename'
execute master..xp_cmdshell
'bcp
"select date, id
from dbo.Weights where customer = ''xxx''"
QUERYOUT @filename -Ssomeserver -T -c'
[code]
I get the correct filename as output but for the results that should show all I get is the "usage bcp"
I can't see what is wrong with my syntax can someone help me out.
=======================================
The statement below is true
The statement above is false
There are 10 kinds of people, those who know binary and those who don't