Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Location
    India
    Posts
    37

    Lightbulb Unanswered: How to Call a Script from T-SQL

    Hello all,
    I have a SQL script file with some statements in it. ... say c:\sai.sql. I want to call it through a T-SQL Procedure...Please let me know the process

    Sai

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    If you DON'T need the script to run under the same SPID as your procedure you could always go the xp_cmdshell & i/osql route.

    If you need to run under the same SPID, then you could load your script into a one row by one column table, select the text into a local variable and EXECUTE the variable.
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •