Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009

    Question Unanswered: Error with DB2 reserved words in SQL?

    Hi All,

    In some of our programs DB2 reserved words are being used.

    DAY and PARAMETER are two columns in a table.

    in one program we inserted DAY - with out any delimeters like insert into table(day) values(day) - it is not giving any error.

    in other program we are insering parameter in the same way inser into table(parameter) values(parameter) - it is giving compilation error saying "parameter" is a reserved word..

    if I modify the statement as insert into table("parameter") values (parameter) -- delimeted the column name - it is working fine.

    Could you please advice why it is happening some times?

    is there any special way to bind if we are using reserved words?

  2. #2
    Join Date
    Feb 2008
    Please give exact and complete error message(s).
    And, where did day and parameter in values(day) and values(parameter) came from?

  3. #3
    Join Date
    Sep 2004
    Also note that this may depend on your specific platform and version of DB2.
    Personally I've never had any "reserved word" conflicts with DB2 for z/OS.
    But the precompiler sometimes thinks he's clever and flags some "valid" constructs (e.g. because they contain reserved words).
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting

Posting Permissions

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