Is it possible to use wildcards in a SQL derived field with a DECODE statement to approximate a "LIKE". For example:
DECODE("REPORTS"."V_CHK_VW_EARNINGS"."CHECKVIEWHOMEDEPT", '%AH', ( NVL( SUM(DISTINCT "REPORTS"."V_CHK_VW_EARNINGS"."CHECKVIEWGROSSPAYA") , 0 )), 0 )
to return the gross pay value for all records with a homedept ending in 'AH'? I tried this exact syntax and the DECODE is returning the default value for all records even though some match the criteria.
I'm wondering if my syntax is wrong for the wildcarded section?
Thanks,
Joel Ray
Ronile, Inc.
DECODE("REPORTS"."V_CHK_VW_EARNINGS"."CHECKVIEWHOMEDEPT", '%AH', ( NVL( SUM(DISTINCT "REPORTS"."V_CHK_VW_EARNINGS"."CHECKVIEWGROSSPAYA") , 0 )), 0 )
to return the gross pay value for all records with a homedept ending in 'AH'? I tried this exact syntax and the DECODE is returning the default value for all records even though some match the criteria.
I'm wondering if my syntax is wrong for the wildcarded section?
Thanks,
Joel Ray
Ronile, Inc.