christimess
Programmer
I am trying to create a derived field that looks like this:
DECODE(SUBSTR("PS_EMPLOYMENT"."CUSTOM_AREA1",1,4),
LIKE '1%%%', 'FEDERAL',
LIKE '2%%%', 'STATE',
'UNKNOWN')
However, it does not like my statement. I know I can do it the long way:
DECODE(SUBSTR("PS_EMPLOYMENT"."CUSTOM_AREA1",1,4),
'1000', 'FEDERAL',
'1001', 'FEDERAL',
and so on, but the list would be very long and would take so long to do I though there has to be a better way, which is why I thought of using the LIKE statement.
Thanks for your help.
DECODE(SUBSTR("PS_EMPLOYMENT"."CUSTOM_AREA1",1,4),
LIKE '1%%%', 'FEDERAL',
LIKE '2%%%', 'STATE',
'UNKNOWN')
However, it does not like my statement. I know I can do it the long way:
DECODE(SUBSTR("PS_EMPLOYMENT"."CUSTOM_AREA1",1,4),
'1000', 'FEDERAL',
'1001', 'FEDERAL',
and so on, but the list would be very long and would take so long to do I though there has to be a better way, which is why I thought of using the LIKE statement.
Thanks for your help.