FND_FLEX table joins [message #527959] |
Fri, 21 October 2011 01:19 |
adit102
Messages: 9 Registered: November 2010
|
Junior Member |
|
|
Hi,
I am trying to join foloowing tables.
1. fnd_flex_Values
2. fnd_flex_values_vl
3. fnd_flex_value_sets
Following is the query
select --LEVEL,
--ffvh.PARENT_FLEX_VALUE "PCAT_CODE",
ffvv.DESCRIPTION "PCAT_CODE_DESC",
ffvv.LAST_UPDATE_DATE,
ffvs.FLEX_VALUE_SET_ID
from fnd_flex_Values ffv,
fnd_flex_values_vl ffvv,
fnd_flex_value_sets ffvs
--FND_FLEX_VALUE_HIERARCHIES ffvh
where ffv.FLEX_VALUE_ID = ffvv.FLEX_VALUE_ID
and ffvs.FLEX_VALUE_SET_ID =ffv.flex_value_set_id
and ffvs.FLEX_VALUE_SET_NAME ='VALUE_SET_NAME'
This returns me the values, but when I try to join FND_FLEX_VALUE_HIERARCHIES to these tables it returns too much of data.
The number of records returned after joining should match to those returned by above query. I have joined these 4 tables by
where ffv.FLEX_VALUE_ID = ffvv.FLEX_VALUE_ID
and ffvs.FLEX_VALUE_SET_ID =ffv.flex_value_set_id
and ffvs.FLEX_VALUE_SET_NAME ='VALUE_SET_NAME'
and ffvh.FLEX_VALUE_SET_ID = ffv.FLEX_VALUE_SET_ID
and ffvh.FLEX_VALUE_SET_ID = ffvv.FLEX_VALUE_SET_ID
How can I join FND_FLEX_VALUE_HIERARCHIES to these tables?
Kindly help.
Thanks,
Aditya
|
|
|
Re: FND_FLEX table joins [message #528013 is a reply to message #527959] |
Fri, 21 October 2011 04:27 |
|
Alien
Messages: 292 Registered: June 1999
|
Senior Member |
|
|
Hi,
you have to join on the flex_value too.
and flex_value between child_flex_value_low and child_flex_value_high;
(Assuming you want to get the parent value).
Regards,
Arian
|
|
|