GL Accounting Segment Hierarcy query [message #260824] |
Tue, 21 August 2007 01:30  |
s.prabhjeet
Messages: 2 Registered: June 2007
|
Junior Member |
|
|
Pls have a look at this query -
SELECT v.flex_value_set_id, h.parent_flex_value, v.flex_value, v.description,
v.summary_flag,h.range_attribute
FROM fnd_flex_values_vl v,
fnd_flex_value_norm_hierarchy h,
fnd_flex_value_sets s
WHERE h.flex_value_set_id = v.flex_value_set_id
AND s.flex_value_set_id = v.flex_value_set_id
AND h.range_attribute IN ('P','C')
the h.range_attribute column describes whether the flex value set id is P = 'Parent' OR C = 'Child'.A particular flex value set id can be both, a parent and a child. I want a query which will give me all only the parent records and will ignore the child records.
Pls help.
|
|
|
Re: GL Accounting Segment Hierarcy query [message #260984 is a reply to message #260824] |
Tue, 21 August 2007 08:03   |
S.Rajaram
Messages: 1027 Registered: October 2006 Location: United Kingdom
|
Senior Member |
|
|
If i understand your question correctly, you want the list of "flex value set id" exists only as a parent and not as a child.
This query give me all the records who are not managers but they are employees.Quote: | SQL> select empno, mgr, ename from emp a where not exists (select null from emp where mgr = a.empno);
EMPNO MGR ENAME
---------- ---------- ----------
7369 7902 SMITH
7499 7698 ALLEN
7521 7698 WARD
7654 7698 MARTIN
7844 7698 TURNER
7876 7788 ADAMS
7900 7698 JAMES
7934 7782 MILLER
|
Try to build your query from this example.
Also could you please from next time
a) Format your post
b) You have explained what you want but there are not create scripts and no expected output.
c) Last but not least before you post read the sticky in this forum.
Regards
Raj
|
|
|
|
|