Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FND_LOOKUP_VALUES vs HR_LOOKUPS

749509May 17 2010 — edited May 17 2010
Hello,

Can someone let me know the difference between fnd_lookup_values and hr_lookups. I know hr_lookups is built on top of fnd_lookup_values, but it does filter off some records based on the value of TAG (one of the column in fnd_lookups). I want to know the purpose behind it.

For example for the Type = LEAV_REAS there is a code called 'WR' which translates to Work Refusal. If you see the TAG it says '+US'.

If you query...

SELECT *
FROM fnd_lookup_values
WHERE lookup_code = 'WR'

..it returns values for LEAV_REAS type.

However if you run the query...

SELECT *
FROM hr_lookups
WHERE lookup_code = 'WR'

... it does not return LEAV_REAS type.

The reason behind this is because of the following decode statement in hr_lookups view...

I want to know the purpose behind this.

AND DECODE (

FLV.TAG,

NULL,

'Y',

DECODE (

SUBSTR (FLV.TAG, 1, 1),

'+',

DECODE (

SIGN (INSTR (FLV.TAG, SYS_CONTEXT ('HR_SESSION_DATA', 'LEG_CODE'))),

1,

'Y',

'N'

),

'-',

DECODE (

SIGN (INSTR (FLV.TAG, SYS_CONTEXT ('HR_SESSION_DATA', 'LEG_CODE'))),

1,

'N',

'Y'

),

'Y'

)

) = 'Y'

Thanks,
Sai
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2010
Added on May 17 2010
2 comments
4,002 views