Exec a .sql file

  • I have a .sql file that is dynamically generated every night. I need to do one of the following:

    1) Run the query in the .sql file using DTS(without having to copy the query...no manual processes)

    OR

    2) Run the query in the .sql file from a command line in a shell script. This script (.bat file) is then ran from DTS.

    Is either method possible and how do you do it? I am spending a lot of time digging and I haven't found the exact answer yet. Any help would be appreciated.

    Skip Gallagher

    Quest Industries, Inc.

    (479) 685-4546


    Skip Gallagher
    Quest Industries, Inc.
    (479) 366-0789

  • use an Execute SQL task to run xp_cmdshell. In the query, run isql with the parameters needed.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply