Hi all. Here is a little trick I came up with the other day. Although a bunch of yu may have already thought of it, I thought I might share it.
I had a directory with about 30 .sql files in it (each one a Create Procedure statement). I needed to deploy all the files to a live database. Being the incredibly lazy person I am I didn't want to open up each file and run it.
So, I dropped into DOS, went to that directory and typed
type *.sql > newfile.sql
This created a new file that contained all of the other files, I could just run that file in query analyzer and I was done.
I actually wrote a stored procedure to do this ( for some reason I write everything in TSQL - its a sickness) so that the formating looked okay. Since numerous developers write the procedures not evryone (including me) puts hard returns at the bottom of the scripts so when concatenated the last line of procedure 1 flows into the first line of procedure 2 which looks a bit ugly - it also allows me to add a header of who created the run script and the date .