• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Create multiple stored procedures

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
tguillor
Asked:
tguillor
1 Solution
 
YZlatCommented:
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
 
LowfatspreadCommented:
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
 
Eugene ZCommented:
open query analyzer and open the .sql  and run
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now