If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Same version Different Syntax ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-09, 13:28
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
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

Quote:
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)

Quote:
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 13:30. Reason: spelling mistakes
Reply With Quote
  #2 (permalink)  
Old 12-15-09, 13:34
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On