Calling another sql file from a sql file

Online project management, task software, and free collaboration workspace: AJAXWorkspace
AJAXWorkspace is a free online workspace that offers task tracking software, team collaboration, online calendar, document sharing, and file management for project management and teamwork.

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