Skip to Main Content

APEX

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!

SQL query a Static LOV

607468Oct 22 2008 — edited Oct 23 2008
Hey everyone

I'm trying to create a pivot report using a technique I'm reading on Ask Tom. In order to get it working I need to return the display values from a static LOV in a sub select statement without using the column attributes functionality available on page 422 of Apex.

My static LOV has the following structure
Display Return
Monitorable 5
Pay modifier/enabler 4
Paid now and later 3
Paid later 2
Paid now 1

My sub query has the following SQL where PAID_ID is equal to the return value of my Static LOV.

select
SCA.SCORE_ID AS "SCORE_ID",
(SELECT MM1.TITLE FROM MET_METRICS MM1 WHERE MM1.MET_ID = SCA.MET_ID) AS "METRIC",
(SELECT BU1.BU
FROM MET_BU BU1,
MET_SCORECARD MS1
WHERE MS1.BU_ID = BU1.BU_ID
AND MS1.SCORECARD_ID = SCA.SCORECARD_ID) AS "BUSINESS UNIT",
SCA.PAID_ID AS "PAID_ID"
from MET_SCORECARD_ALLOC SCA
WHERE SCA.DELETED_BY IS NULL

I'd like to replace PAID_ID with the display value of my LOV WITHOUT using the Column Attributes functionality available of page 422 of Apex.

Is anyone able to advise whether it's possible to perform a join on the LOV directly in my sql query?

Any assistance would be very much appreciated :)

Dave
This post has been answered by petervdn2 on Oct 23 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 20 2008
Added on Oct 22 2008
4 comments
1,291 views