Hello All,
I am trying to put ‘ALL’ in a LOV so that it picks up all the values in the list. I looked at other articles and tried to use a union of tables but it doesn’t fetch any data. Following is the sql generated when a user selects ‘ALL’:
SELECT
M_INVOICE_CURR_TEST.ACCT_CODE,
M_INVOICE_CURR_TEST.EVENT,
M_INVOICE_CURR_TEST.CLAIM_NO,
sum(M_INVOICE_CURR_TEST.AMOUNT)
FROM
M_INVOICE_CURR_TEST,
( select t.LESSEE_CODE,t.VEHICLE_NO,yr_mon from m_invoice_curr_test t
union
select t.LESSEE_CODE,t.VEHICLE_NO,yr_mon from b_invoice_curr_test t) Table__4
WHERE
( Table__4.LESSEE_CODE=M_INVOICE_CURR_TEST.LESSEE_CODE AND Table__4.VEHICLE_NO=M_INVOICE_CURR_TEST.VEHICLE_NO
AND M_INVOICE_CURR_TEST.YR_MON=Table__4.YR_MON )
AND (
Table__4.LESSEE_CODE = ‘0G36’
AND M_INVOICE_CURR_TEST.PAGE_NUMBER IN (‘ALL’)
)
GROUP BY
M_INVOICE_CURR_TEST.ACCT_CODE,
M_INVOICE_CURR_TEST.EVENT,
M_INVOICE_CURR_TEST.CLAIM_NO
What am I doing wrong. The select for the LOV object is:
SELECT DISTINCT
M_INVOICE_CURR_TEST.PAGE_NUMBER
FROM
M_INVOICE_CURR_TEST
UNION SELECT ‘ALL’ FROM DUAL
Your help will be greatly appreciated.
Thanks,
Purnima
prnmsharma (BOB member since 2008-03-18)