Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-03-13 : 06:30:44
|
| hi, is it possible to run a file test.sql from QA without clicking on file , open ?also my test.sql looks like :exec sql1.sqlgoexec sql2.sqlgois this possible or will I need to copy all scripts into one file ? |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-03-13 : 07:16:58
|
| SQL Server includes a command line tool, OSQL.EXE, that can run the individual files - e.g. from a BATCH file.There isn't an "include" directive [in OSQL] as far as I know, but in a BATCH file you could do something like:FOR %%f IN (x:\mypath\*.SQL) DO OSQL %%f(You'll need a bunch of parameters to OSQL for servername, userid & password, etc.)Kristen |
 |
|
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-03-14 : 07:07:08
|
| Thanks alot Kristen |
 |
|
|
|
|
|