December 2, 2014 at 8:42 am
Hello all,
I want to run multiple SQL script files from a directory in a particular order. I want to read file names from a text file and run / execute SQL files accordingly.
Can you please suggest, if i can achieve my goal using a batch file? if yes, any reference / example would be very helpful
Thank you!
December 2, 2014 at 9:21 am
windows is pretty much ORDER By Filename
whether from powershell, command window, or within a programming language and iterating through files,
the data comes over as ordered by filename, unless you do something extra.
So if you follow a naming convention for your files, they would be grabbed , and thus executed, in a specific order.
I Typically do something like
SQL001_ScriptPurpose.sql,
SQL002_ScriptPurpose.sql
Lowell
December 2, 2014 at 12:54 pm
thank you!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply