Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: Same version Different Syntax ??

    Hi Guys,

    Our developers have brought into my notice that on EXPRESS-C we are having CONCAT behave differently. Can some one help me make both same ??

    STAGING

    C:\Program Files\IBM\SQLLIB\BIN>db2 connect to STAGING user db2admin
    Enter current password for db2admin:

    Database Connection Information

    Database server = DB2/NT 9.7.0
    SQL authorization ID = DB2ADMIN
    Local database alias = STAGING


    C:\Program Files\IBM\SQLLIB\BIN>db2 "select year(date)|| month(date) from SSG_TST"

    1
    ----------------------
    20094

    1 record(s) selected.


    C:\Program Files\IBM\SQLLIB\BIN>db2level
    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09050" with
    level identifier "03010107".
    Informational tokens are "DB2 v9.5.0.808", "s071001", "NT3295", and Fix Pack
    "0".
    Product is installed at "C:\PROGRA~1\IBM\SQLLIB" with DB2 Copy Name "DB2COPY1".


    C:\Program Files\IBM\SQLLIB\BIN>
    On My Desktop (same as PRODUCTION)

    C:\Program Files\IBM\SQLLIB\BIN>db2level
    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09050" with
    level identifier "03010107".
    Informational tokens are "DB2 v9.5.0.808", "s071001", "NT3295", and Fix Pack
    "0".
    Product is installed at "C:\PROGRA~1\IBM\SQLLIB" with DB2 Copy Name "DB2COPY1".


    C:\Program Files\IBM\SQLLIB\BIN>db2 connect to SAMPLE

    Database Connection Information

    Database server = DB2/NT 9.5.0
    SQL authorization ID = SGILL
    Local database alias = SAMPLE


    C:\Program Files\IBM\SQLLIB\BIN>db2 "select year(date)|| month(date) from SSG_TST"
    SQL0440N No authorized routine named "||" of type "FUNCTION" having
    compatible arguments was found. SQLSTATE=42884

    C:\Program Files\IBM\SQLLIB\BIN>db2level
    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09050" with
    level identifier "03010107".
    Informational tokens are "DB2 v9.5.0.808", "s071001", "NT3295", and Fix Pack
    "0".
    Product is installed at "C:\PROGRA~1\IBM\SQLLIB" with DB2 Copy Name "DB2COPY1".


    C:\Program Files\IBM\SQLLIB\BIN>

    Does it need any setting or binding ??

    DBFinder
    Last edited by DBFinder; 12-15-09 at 14:30. Reason: spelling mistakes

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You are comparing 9.7 to 9.5. I believe that there is more Oracle compatibility in 9.7 and that is letting you get away with concatenating 2 integers where it is invalid in V 9.5.

    The db2level you are using is on the workstation both times and giving you the same result. Look at your connect outputs. They clearly show the difference.

    Andy

Posting Permissions

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