Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Create multiple stored procedures

Posted on 2006-06-09
3
Medium Priority
?
257 Views
Last Modified: 2008-02-20
SS2000

What is the most efficient way to create numerous (about 100) stored procedures from individual .sql code files?  I really don't want to deal with them individually.  Is there some way to quickly concantenate them into one file?

Thanks
tguillor
0
Comment
Question by:tguillor
3 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 16871055
you could put all the file names into an array.
Then loop through the array, retrieving file names.
The open each file and run the code
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 2000 total points
ID: 16871140
do use want to use the dos for command to just invoke the osql utility to compile your procedures?

eg in DOS

FOR %a IN (*.SQL) DO ECHO OSQL -I%a -O%a.OUT -E -SSERVERNAME -DDATABASENAME >> A.bat

then

a.bat ...

assuming you use a trusted connection -E

hth
0
 
LVL 43

Expert Comment

by:Eugene Z
ID: 16871500
open query analyzer and open the .sql  and run
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question