If I do "select * from suppliers" I get a valid list of details from the table.
If however I do:
declare @str varchar(255)
select @str = 'isql -Q "select * from Suppliers" -E -oc:\file.txt'
exec master..xp_cmdshell @str
to get the output to write to a file, the contents of the file are :
Msg 208, Level 16, State 1, Server UKHUDGHTONA5274, Line 1
Invalid object name 'Suppliers'.
Why ?????
Alex
If however I do:
declare @str varchar(255)
select @str = 'isql -Q "select * from Suppliers" -E -oc:\file.txt'
exec master..xp_cmdshell @str
to get the output to write to a file, the contents of the file are :
Msg 208, Level 16, State 1, Server UKHUDGHTONA5274, Line 1
Invalid object name 'Suppliers'.
Why ?????
Alex