Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Unhappy Unanswered: Strange error message when running a ddl script

    hi,

    i am new to db2 and try to run a simple ddl script using db2 script center. when running the following script ...


    CONNECT TO PLATO01 USER db2admin USING db2admin

    CREATE TABLE THACTIVI
    (ACTIVITY_ID INTEGER NOT NULL,
    ACTIVITY_NAME CHAR(32) NOT NULL,
    ACT_PRIORITY INTEGER,
    ACTIVITY_STATUS INTEGER,
    ACTIVITY_OWNER CHAR(32),
    ACT_DEFERRABLE CHAR(1) NOT NULL,
    MAN_HOURS INTEGER,
    PREDECESSOR_ID INTEGER,
    ACT_DEPENDS_ON INTEGER,
    ACTIVITY_TYPE CHAR(32),
    MILESTONE CHAR(1) NOT NULL,
    PERSON_ID INTEGER,
    ADMINTASK_ID INTEGER,
    ....)


    CREATE TABLE THADTASK
    (ADMINTASK_ID INTEGER NOT NULL,
    ADMINTASK_NAME CHAR(32) NOT NULL,
    PERSON_ID INTEGER NOT NULL,
    START_DATE DATE,
    ....)

    CONNECT RESET

    ... i get this output from the journal:

    CONNECT TO PLATO01 USER db2admin USING



    Database Connection Information



    Database server = DB2/NT 7.2.3

    SQL authorization ID = DB2ADMIN

    Local database alias = PLATO01





    CREATE TABLE THACTIVI

    DB21034E The command was processed as an SQL statement because it was not a

    valid Command Line Processor command. During SQL processing it returned:

    SQL0104N An unexpected token "TABLE" was found following "CREATE ". Expected

    tokens may include: "TYPE". SQLSTATE=42601



    (ACTIVITY_ID INTEGER NOT NULL,

    DB21034E The command was processed as an SQL statement because it was not a

    valid Command Line Processor command. During SQL processing it returned:

    SQL0104N An unexpected token "INTEGER" was found following "(ACTIVITY_ID ".

    Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601

    ......

    does anyone know what is wrong? I am using DB2 7.2.3 PE

    thx.

  2. #2
    Join Date
    Nov 2003
    Posts
    7

    Post

    Hi,

    U write like this it may be work.U write total statement in one line.

    CREATE TABLE THACTIVI(ACTIVITY_ID INTEGER NOT NULL,ACTIVITY_NAME CHAR(32) NOT NULL,ACT_PRIORITY INTEGER,ACTIVITY_STATUS INTEGER,ACTIVITY_OWNER CHAR(32),ACT_DEFERRABLE CHAR(1) NOT NULL,MAN_HOURS INTEGER,PREDECESSOR_ID INTEGER,ACT_DEPENDS_ON INTEGER,ACTIVITY_TYPE CHAR(32),MILESTONE CHAR(1) NOT NULL,PERSON_ID INTEGER,ADMINTASK_ID INTEGER)

    Regards

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Strange error message when running a ddl script

    Delimit each statement with a ';'
    and use

    db2 -tvf <filename>

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

  4. #4
    Join Date
    Nov 2003
    Posts
    9

    Re: Strange error message when running a ddl script

    Originally posted by sathyaram_s
    Delimit each statement with a ';'
    and use

    db2 -tvf <filename>

    Cheer
    Sathyaram

    thx Sathyaram. One question remains: why is this from the clp running but from the sql script center not?

    thx,
    dirk

Posting Permissions

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