Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Posts
    13

    Unanswered: clp - run a external sql file

    I have to say I am sorry in advance for asking such a basic question but I could not find it through a search.

    From the DB2 CLP how do I run a external .sql file?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    db2 -tvsf <filename>

    This assumes that the statement are terminated by a semicolon (.

    If you have something else as a terminator (e.g. the @ sign):

    db2 -td@ -svf <filename>

    HTH

    Andy

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you are in the db2 prompt, then you may do

    db=>!db2 -td@ -svf <filename>

    HTH
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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