Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    8

    Unanswered: SQL Include and Execute

    Hi everyone,

    Is there a way in SQL to include and execute another file? For example, I have file1 and I would like to execute the contents of file2 from file1. How can this be done?

    Thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    In Oracle, all you have to do is put an @ sign in front of the file. So, you have something like this:

    file1.sql
    <sql code>
    @file2
    <more sql code>

    file2.sql
    <some other sql code>

    JoeB

  3. #3
    Join Date
    Feb 2004
    Posts
    8
    Can that be done in SQL Server 2000?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Originally posted by crazyfishpants
    Can that be done in SQL Server 2000?
    You should have posted this in the SQL Server forum.

    "SQL" <> "Microsoft SQL Server"!!!

  5. #5
    Join Date
    Feb 2004
    Posts
    8
    Honest mistake. Sorry. Any ideas from the SQL Server people?
    Last edited by crazyfishpants; 02-05-04 at 11:19.

Posting Permissions

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