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 |
|
odec
Starting Member
2 Posts |
Posted - 2002-03-14 : 04:26:34
|
| Hi,we are managing a db and we're wondering of we can callour query files from a query?Kind of in a query we call the query's we have made to maintainthe db.thxEdited by - odec on 03/14/2002 04:27:17 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-03-14 : 05:20:16
|
| HiHave you looked at Stored Procedures ? They sound perfect for what you want to do.Damian |
 |
|
|
odec
Starting Member
2 Posts |
Posted - 2002-03-14 : 06:50:03
|
| we have made multiple scripts/querys and we want to call them all from one query/script. |
 |
|
|
Teroman
Posting Yak Master
115 Posts |
Posted - 2002-03-14 : 06:55:06
|
| i think you need to create a procedure that calls others, for examplecreate procedure proc1asselect 1gocreate procedure proc2asselect 2gocreate procedure proc3asexec proc1exec proc2goexec proc3godrop procedure proc1drop procedure proc2drop procedure proc3go |
 |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-14 : 07:55:31
|
Not sure exactly what odec means. Do you want to Open and run a .sql file located on the server from a SP? I would be interested in anyones ideas on how to do this. Possibly through a DTS package? Jeremy |
 |
|
|
ToddV
Posting Yak Master
218 Posts |
Posted - 2002-03-14 : 09:04:07
|
| You can run scripts with osql, but i am not conviced this is what you are looking for. Check BOL osql |
 |
|
|
|
|
|