Hi,
I want to run a script against a sqlserver database and
I want to redirect the output to a file.
How can I do that?
I run this script called exec_sql.cmd
isql -S servername -U sa -d database -i query.sql -o query.log
My query.sql has:
SELECT * FROM table WHERE cola IN (1,3,5,7,9,10,13...)
DELETE FROM table WHERE cola IN (1,3,5,7,9,10,13...)
SELECT * FROM table WHERE cola IN (1,3,5,7,9,10,13...)
Does this sql work? Unfortunately I don't have a test
database on which I can run the query.
I know that after the statement I don't have to put ;
Please help, thanks.
Tarek
I want to run a script against a sqlserver database and
I want to redirect the output to a file.
How can I do that?
I run this script called exec_sql.cmd
isql -S servername -U sa -d database -i query.sql -o query.log
My query.sql has:
SELECT * FROM table WHERE cola IN (1,3,5,7,9,10,13...)
DELETE FROM table WHERE cola IN (1,3,5,7,9,10,13...)
SELECT * FROM table WHERE cola IN (1,3,5,7,9,10,13...)
Does this sql work? Unfortunately I don't have a test
database on which I can run the query.
I know that after the statement I don't have to put ;
Please help, thanks.
Tarek