Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2006
    Posts
    17

    Question Unanswered: create table with db2

    Hello
    When i execute this order by spufi, it doesn't work.
    Could you help me?

    CREATE TABLE TACLMEMO
    ( ACLMEMO-UG NUM (4) NOT NULL
    , ACLMEMO-NUMCLI NUM (6) NOT NULL
    , ACLMEMO-SEQUENCE NUM (3) NOT NULL
    , ACLMEMO-DATE-CR DATE NOT NULL WITH DEFAULT
    , ACLMEMO-TITRE VARCHAR (60) NOT NULL
    , ACLMEMO-TEXTE VARCHAR (1482) NOT NULL
    , ACLMEMO-TIMEST-WR TIMESTAMP NOT NULL WITH DEFAULT
    , ACLMEMO-USER-WR CHAR (8) NOT NULL WITH DEFAULT
    , ACLMEMO-TIMEST-RW TIMESTAMP NOT NULL WITH DEFAULT
    , ACLMEMO-USER-RW CHAR (8) NOT NULL WITH DEFAULT
    )
    IN DACL.SACLMEMO
    ;
    ---------+---------+---------+---------+---------+---------+---------+---------+
    DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "-". SOME SYMBOLS THAT MIGHT BE
    LEGAL ARE: KEY CHAR LONG DOUBLE CHARACTER <IDENTIFIER> RESULT_SET_LOC-
    ATOR
    DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
    DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD = 0 0 0 -1 162 0 SQL DIAGNOSTIC INFORMATION
    DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF'
    X'000000A2' X'00000000' SQL DIAGNOSTIC INFORMATION
    by the way
    ACLMEMO-UG and
    ACLMEMO-NUMCLI and
    ACLMEMO-SEQUENCE
    Are numeric (in cobol pic 9(4) for the first pic 9(6) for the second and pic 9(3) for the third.
    Kind regards

  2. #2
    Join Date
    Apr 2005
    Location
    USA
    Posts
    130
    You need to use '_' in column names. Z/os DB2 doesn't accept this '-' sysbol in column names. Also you will have to change data type as 'Numeric' . There is no data type called 'NUM'

  3. #3
    Join Date
    Mar 2006
    Posts
    17
    thanks for your help schintala

Posting Permissions

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