https://generalledger-gl.blogspot.com/2017/08/plsql-query-to-check-wrong-account.html
PLSQL Query to Check wrong Account Natures in Oracle EBS
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '1%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%A%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '2%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%L%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '3%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%O%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '4%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%R%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '5%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%E%'
---------------------------
select f.FLEX_VALUE,
f.DESCRIPTION,
f.ENABLED_FLAG,
f.END_DATE_ACTIVE,
decode(v.ACCOUNT_TYPE,
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
v.ACCOUNT_TYPE) GL_CODE_COMB
,
decode(substr(f.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
f.COMPILED_VALUE_ATTRIBUTES) VALUE_SET
from FND_FLEX_VALUES_VL f, gl_code_combinations v
where v.SEGMENT4 = f.FLEX_VALUE
and f.FLEX_VALUE_SET_ID = 1013510
and v.ACCOUNT_TYPE != substr(f.COMPILED_VALUE_ATTRIBUTES, 5, 1)
PLSQL Query to Check wrong Account Natures in Oracle EBS
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '1%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%A%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '2%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%L%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '3%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%O%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '4%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%R%'
union
select a.FLEX_VALUE,
a.DESCRIPTION,
a.ENABLED_FLAG,
a.END_DATE_ACTIVE,
decode(substr(a.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
a.COMPILED_VALUE_ATTRIBUTES) NATURE
from FND_FLEX_VALUES_VL a
where a.FLEX_VALUE_SET_ID = 1013510
and a.FLEX_VALUE like '5%'
and a.COMPILED_VALUE_ATTRIBUTES not like '%E%'
---------------------------
select f.FLEX_VALUE,
f.DESCRIPTION,
f.ENABLED_FLAG,
f.END_DATE_ACTIVE,
decode(v.ACCOUNT_TYPE,
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
v.ACCOUNT_TYPE) GL_CODE_COMB
,
decode(substr(f.COMPILED_VALUE_ATTRIBUTES, 5, 1),
'E',
'EXPENSE',
'L',
'LIABILITY',
'O',
'Ownership/Stockholder''s Equity',
'R',
'REVENUE',
'A',
'ASSET',
f.COMPILED_VALUE_ATTRIBUTES) VALUE_SET
from FND_FLEX_VALUES_VL f, gl_code_combinations v
where v.SEGMENT4 = f.FLEX_VALUE
and f.FLEX_VALUE_SET_ID = 1013510
and v.ACCOUNT_TYPE != substr(f.COMPILED_VALUE_ATTRIBUTES, 5, 1)
No comments:
Post a Comment