Results 1 to 3 of 3

Thread: Error on Insert

  1. #1
    Join Date
    May 2012
    Location
    Canada
    Posts
    14

    Unanswered: Error on Insert

    Here's a insert statement

    Code:
    INSERT INTO BaselineLoading 
    (PROJECTNAME, 
    PROJECTID, 
    SITETEAMID, 
    SITEDESCRIPTION, 
    TEAMNAME, 
    DEC-11, 
    JAN-12, 
    FEB-12, 
    MAR-12, 
    APR-12, 
    MAY-12, 
    JUN-12, 
    JUL-12, 
    AUG-12, 
    SEP-12, 
    OCT-12, 
    NOV-12, 
    WORKBOOKID) 
    VALUES
    ('Premier & Advance', 
    155, 
    45521, 
    'Smartforms',
    'team', 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    3.13, 
    null);

    Error Message:
    INSERT INTO BaselineLoading (PROJECTNAME, PROJECTID, SITETEAMID, SITEDESCRIPTION, TEAMNAME, DEC-11, JAN-12, FEB-12, MAR-12, APR-12, MAY-12, JUN-12, JUL-12, AUG-12, SEP-12, OCT-12, NOV-12, WORKBOOKID) VALUES ('Premier & Advance', 155, 45521, 'Smartforms', 'team', 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 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 "(PROJECTNAME, PROJECTID, SITETEAMID, SIT" was
    found following "INTO BASELINELOADING". Expected tokens may include:
    "<values>". SQLSTATE=42601

    SQL0104N An unexpected token "(PROJECTNAME, PROJECTID, SITETEAMID, SIT" was found following "INTO BASELINELOADING". Expected tokens may include: "<values>".

    Explanation:

    A syntax error in the SQL statement or the input command string
    for the SYSPROC.ADMIN_CMD procedure was detected at the specified
    token following the text "<text>". The "<text>" field indicates
    the 20 characters of the SQL statement or the input command
    string for the SYSPROC.ADMIN_CMD procedure that preceded the
    token that is not valid.

    As an aid, a partial list of valid tokens is provided in the
    SQLERRM field of the SQLCA as "<token-list>". This list assumes
    the statement is correct to that point.

    The statement cannot be processed.

    User Response:

    Examine and correct the statement in the area of the specified
    token.

    sqlcode : -104

    sqlstate : 42601

    Please help me resolve this

    Thanks

  2. #2
    Join Date
    May 2012
    Location
    Canada
    Posts
    14
    i have resolved the error...
    it was due to reserved name used for columns

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You used special characters in the column names, so you'd need delimited identifiers. There was no reserved name in the picture.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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