Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a sql statement from a .sql or .txt file

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all. I would like to run a sql statement from a .txt file (or .sql file). I know in Query Analyzer I could File/Open/xxxx.sql then execute the statement, but there are many of them. I would like to save one .sql file with all the "executes" I can run them peridocially. Each of these .sql files can change periodically.

Any ideas how to run .sql file from Query Analyzer?

Your help is very much appreciated!

Steve
sms@hmbnet.com
 
How about a .bat/.vbs script to execute each of the .sql files via isql?
 
I'm not sure what I understand.
In the same sql you can put many queries without problems. Also you can create a C program to read them and to execute.
John Fill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top