Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using instr in a decode select?

579406Jul 17 2007 — edited Jul 17 2007
Is it possible to use the INSTR function within a DECODE function? What I want to do is return 'Repair and Return' if my column has an 'RR' in it, otherwise return 'Swap'. This is what I have tried within my select:

SELECT colA,
DECODE( instr(M4OWNER.REQUEST_LINE.REQUEST_PROCESS, 'RR' , 1, 1) from dual,'REPAIR AND RETURN','SWAP')
FROM tableA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2007
Added on Jul 17 2007
6 comments
1,975 views