Calling another sql file from a sql file

Free Link Exchange Software and Automate Link Swap Service
Offers free link swap service, link trade directory, reciprocal link exchange software that auto updates your link pages and complete link exchange.

We must use xp_cmdshell and an application which executes the command like sqlcmd or OSQL (and the –I switch). Here’s an example of how to do it:

osql -S%1 -U%2 -P%3 -d%4 -i”.\DataConversion.sql”

where –S,-U etc are the various options…

Posted in MS SQL.

Leave a Reply