I would like to write a \'generic\' script to operate on a number of databases. The \'use databasename\' commands will be distributed in the body of the script. I would rath
You could NOT put a use statement in your script, and supply the database with the osql command (or whatever you're using) like this:
osql -S servername -d databasename -U username -P password -i script.sql