Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
woking on a ims-db2 migration pgm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
Author Message
ashimer

Active User


Joined: 13 Feb 2004
Posts: 267
Location: Bangalore

PostPosted: Fri Sep 24, 2004 9:02 am    Post subject: woking on a ims-db2 migration pgm
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
References
PostPosted: Fri Sep 24, 2004 9:02 am    Post subject: Re: woking on a ims-db2 migration pgm Reply with quote

ovreddy

Active User


Joined: 06 Dec 2004
Posts: 200
Location: Keane India Ltd., Hyderabad

PostPosted: Thu Dec 16, 2004 5:30 pm    Post subject: One way..
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1