IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

woking on a ims-db2 migration pgm


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Sep 24, 2004 9:02 am
Reply with quote

I am woking on a ims-db2 migration pgm.
I am using the following query in my cursor


Select cols
From table
Where concat(key1,concat(key2,concat(key3,key4))) >= concat(:key1,concat(:key2,concat(:key3,:key4))) in pl1.
Can you plz suggest a better way so that I cud tune up my sql query.



thanks
ashish
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Thu Dec 16, 2004 5:30 pm
Reply with quote

Hi Ashish,

One way to combine more than two columns is you can use concatination operator ( || ) instead of CONCAT which is more compatible.

select cols from tab where col1 || col2 || col3 || col4 = :col1 || :col2 || :col3 || :col4;

Other wise you can create a function to do this...

Bye,
Reddy.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Need opinion on mainframe to cloud mi... General Talk & Fun Stuff 6
No new posts DB2 to Postgre migration DB2 5
This topic is locked: you cannot edit posts or make replies. COBOL/CICS with real time MQ Series u... CICS 2
No new posts DFSMShsm dump tape migration to new t... IBM Tools 1
No new posts Db2 migration from V4/6 to V8/10 DB2 1
Search our Forums:

Back to Top