Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    3

    Unanswered: Running scripts in command center

    It might be just me but I have not found a way to run scripts in the W2K version of db (7.1).

    I can run single commands in the interactive window, and they run fun but I cannot find a way to execute more than one command at a time. If I go to the script window and try to execute a single command, it fails with wacky syntax errors and yet that command runs fine in the interactive window.

    These are DDL commands (create table, create tablespace etc.)

    I cannot get a script to run from the script centre either, although the commands all run fine if entered one at a time.

    I am new to DB2 (a SQL Server guy). Can't seem to find much help in the docs either. I think I am really starting to appreciate how easy SQL Server is to use!

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Bob,
    In the command center, bring down the Tools menu and goto
    Tool Settings. On the General Tab there will be an option labeled
    "Use statement termination character". Make sure the box is checked
    and the value is a semicolon (. Then in your scripts, put a semicolon
    on the end of each command, and that should do the trick.
    For example:

    Create table mytable (col1 int, col2 int);
    Create table yourtable (col1 char(10),col2 char(10));

    HTH

    Andy

  3. #3
    Join Date
    Feb 2003
    Posts
    3
    That worked great! Such a simple thing but obscure to me.

    Thanks a lot!


    Bob


    Originally posted by ARWinner
    Bob,
    In the command center, bring down the Tools menu and goto
    Tool Settings. On the General Tab there will be an option labeled
    "Use statement termination character". Make sure the box is checked
    and the value is a semicolon (. Then in your scripts, put a semicolon
    on the end of each command, and that should do the trick.
    For example:

    Create table mytable (col1 int, col2 int);
    Create table yourtable (col1 char(10),col2 char(10));

    HTH

    Andy

Posting Permissions

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