general ledger - account
Dear All,
I'm trying to write an SQL query that give the account type and the account number:
SELECT
FLEX_VALUE,
T.description ,
l1.meaning enabled_flag ,
l2.meaning parent_flag
from FND_FLEX_VALUES_TL T,
FND_FLEX_VALUES B ,
fnd_flex_hierarchies_tl h,
gl_lookups l1,
gl_lookups l2
where B.FLEX_VALUE_ID = T.FLEX_VALUE_ID
and B.FLEX_VALUE_SET_ID in( 1007721)
and h.FLEX_VALUE_SET_ID(+) = B.FLEX_VALUE_SET_ID
and h.hierarchy_id(+) = B.structured_hierarchy_level
and B.ENABLED_FLAG = l1.lookup_code
and l1.lookup_type = 'YES/NO'