Aug 6, 2001 #1 smita123 Programmer Aug 6, 2001 2 US Is there any function in DB2 which is similar to DECODE of Oracle? Basically an IF THEN ELSE logical function.
Is there any function in DB2 which is similar to DECODE of Oracle? Basically an IF THEN ELSE logical function.
Aug 7, 2001 #2 esskayind Programmer Aug 2, 2001 8 IN Hai, We have CASE expression in DB2 as workaround for DECODE Function in Oracle. Eg. Select DECODE(Name, 'XXX','My Name','Your Name') from TableName; Select CASE NAME WHEN 'XXX' THEN 'My Name' ELSE 'Your Name' END from TableName I hope,The above eg. will help you Upvote 0 Downvote
Hai, We have CASE expression in DB2 as workaround for DECODE Function in Oracle. Eg. Select DECODE(Name, 'XXX','My Name','Your Name') from TableName; Select CASE NAME WHEN 'XXX' THEN 'My Name' ELSE 'Your Name' END from TableName I hope,The above eg. will help you
Aug 7, 2001 Thread starter #3 smita123 Programmer Aug 6, 2001 2 US Thanks a lot. It helped me Upvote 0 Downvote