Concatenating files for MS SQL Server Script

Got a problem you cannot solve? Try here.
Post Reply
fohrman
Posts: 3
Joined: Mon Jun 23, 2008 11:49 am

Concatenating files for MS SQL Server Script

Post by fohrman »

Greetings --

We need to essentially run the same MS SQL script twice when we run the install... the only difference is the first few lines of the file.

The first time it needs to run <Static Lines 1> + <Dynamic Lines 1>
The second time it needs to run <Static Lines 2> + <Dynamic Lines 1>

We know all of these at compile time. We'd like to make this as convenient as possible. One way we could do it is to have a DOS batch file that creates these, but we're wondering if there's a better way.

Thanks in advance for any advice.
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

I use "Write to Text File" and the from the installer I run sqlcmd or osql.exe against the script I just created.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
fohrman
Posts: 3
Joined: Mon Jun 23, 2008 11:49 am

Post by fohrman »

Thanks, Jim, that makes complete sense.
Post Reply