Hi,
I am trying to execute
exec Master..xp_cmdshell 'bcp "Select _Id_ from PM.dbo._TST_" queryout "C:\_ID_Test.txt" -c -U SA -P AA112233** -S MYLAP\SQLEXPRESS'
Gives an Output
SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file
NULL
The Same Statement when I execute from cmd prompt
bcp "Select _Id_ from PM.dbo._TST_" queryout "C:\_ID_Test.txt" -c -U SA -P AA112233** -S MYLAP\SQLEXPRESS
Gives the Output
Starting copy...
4 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 94 Average : (42.55 rows per sec.)
Where am I going wrong...
-- Regards
Alban Lijo
[font="Courier New"]-- Alban Lijo <SQL Rookie> :-)[/font]