Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    51

    Unanswered: Create table command

    Hi guys,

    I'm trying a simple create command in two different servers , Server01 and Server02:

    create table a (a char (1) null) ..

    It works fine in the Server01
    $db2 "create table a (a char (1) null)"
    DB20000I The SQL command completed successfully.

    but ...

    It not works on Server02 :
    db2 "create table a (a char (1) 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 ")" was found following "e A (a char (1) null".
    Expected tokens may include: "<references_spec>". SQLSTATE=42601

    Question : why ????

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Different commands could return different results.

  3. #3
    Join Date
    Sep 2003
    Posts
    51
    Are you crazy ??

    we have exactly the same command : db2 "create table a (a char (1) null)"

  4. #4
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    Are you crazy ??
    Probably not, but you might be. . . Possibly you will outgrow this attitude.

    Not the smartest idea to act belligerant to one of the best "helpers" here

    What you posted IS 2 different commands. . . Look at your post. . .

  5. #5
    Join Date
    Sep 2003
    Posts
    51
    I think you're crazy too .. commands are the same :

    $db2 "create table a (a char (1) null)"
    DB20000I The SQL command completed successfully.

    but ...

    It not works on Server02 :
    db2 "create table a (a char (1) null)"


    $ character is from OS prompt ....

    If you read, and dont understand, I can change the sentences ..

    It works fine in the Server01
    db2 "create table a (a char (1) null)"
    DB20000I The SQL command completed successfully.
    but ...
    It not works on Server02 :
    db2 "create table a (a char (1) 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 ")" was found following "e A (a char (1) null".
    Expected tokens may include: "<references_spec>". SQLSTATE=42601

    good ?

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    On a windows machine I also have a problem with that statement. If I change the table name to anything else, it works. Original statement works OK with a GUI client.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Tags for this Thread

Posting Permissions

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