SELECT DECODE (gcc.segment1,
'10', 'APIL - HO - 10',
'20', 'APIL - BPU UNIT - 20',
'21', 'APIL - BPU UNIT - 21',
'30', 'APIL - SHREE GOPAL UNIT - 30',
'40', 'APIL - SEWA UNIT - 40',
'50', 'APIL - BWN - 50',
'51', 'APIL - BWN - 51'
) operating_unit,
ffv.flex_value_meaning natural_acct, ffv.description acct_desc
FROM gl_code_combinations gcc, fnd_flex_values_vl ffv
WHERE gcc.segment3 = ffv.flex_value
AND ffv.flex_value_set_id = 1014870
AND ffv.end_date_active IS NOT NULL
-- or AND ffv.END_DATE_ACTIVE IS NULL
AND gcc.segment1 IN ('10', '20', '21', '30', '40', '50', '51')
ORDER BY TO_NUMBER (gcc.segment1)
'10', 'APIL - HO - 10',
'20', 'APIL - BPU UNIT - 20',
'21', 'APIL - BPU UNIT - 21',
'30', 'APIL - SHREE GOPAL UNIT - 30',
'40', 'APIL - SEWA UNIT - 40',
'50', 'APIL - BWN - 50',
'51', 'APIL - BWN - 51'
) operating_unit,
ffv.flex_value_meaning natural_acct, ffv.description acct_desc
FROM gl_code_combinations gcc, fnd_flex_values_vl ffv
WHERE gcc.segment3 = ffv.flex_value
AND ffv.flex_value_set_id = 1014870
AND ffv.end_date_active IS NOT NULL
-- or AND ffv.END_DATE_ACTIVE IS NULL
AND gcc.segment1 IN ('10', '20', '21', '30', '40', '50', '51')
ORDER BY TO_NUMBER (gcc.segment1)
No comments:
Post a Comment