RTFM on DECODE:
DECODE(state, 1, ‘CA’, 2, ‘OR’, 3, ‘WA’, 4, ‘AR’)
Igor Neyman, OCP DBA [EMAIL PROTECTED]
-----Original Message-----
Hi, Is there a statement in pl/SQL like case or is if elsif the only way. Meaning if I need to transalate state depending on input number as follows :
1 - CA 2 - OR 3 - WA 4 - AR
Can I have one statement like case 'state# :
1: state := 'CA' 2: state := 'OR'
etc.
or do i have to do :
IF state# = 1 THEN state := 'CA'; ELSIF state# = 2 THEN state := 'OR';
etc
Thank You.
Do you Yahoo!? |
- RE: ** is there PL/SQL for case Jamadagni, Rajendra
- RE: ** is there PL/SQL for case Guang Mei
- RE: ** is there PL/SQL for case Igor Neyman
- RE: ** is there PL/SQL for case Rick_Cale
- RE: ** is there PL/SQL for case A Joshi
- RE: ** is there PL/SQL for case Igor Neyman
- RE: ** is there PL/SQL for case Guang Mei
- RE: ** is there PL/SQL for case A Joshi
- ** is there PL/SQL for case A Joshi
- Re: ** is there PL/SQL for case Daniel Fink
- RE: ** is there PL/SQL for case Pardee, Roy E
- RE: ** is there PL/SQL for case Jamadagni, Rajendra