Thanks! Yes, I am using Oracle. After posting my question, I created the view in SYSADM (without using a synonym), then created an extended query referencing the view. The QRP recognized the view, but only displayed data from one of the resulting rows that matched the part_id. I'm not sure what I need to do differently to get the QRP to display multiple rows from the view matching the part_id.
Here's my view script and extended query script:
Code: Select all
VIEW:
CREATE OR REPLACE VIEW SYSADM.L3_PART_LOCATION_QTY_V(
PL_PART_ID,
PL_WAREHOUSE_ID,
PL_LOCATION_ID,
PL_QTY,
PL_WHSE_LOC_QTY
)
AS
SELECT
DISTINCT
PL.PART_ID, PL.WAREHOUSE_ID, PL.LOCATION_ID, PL.QTY,
PL.PART_ID || '//' || --INCLUDE FOR TESTING ONLY
PL.WAREHOUSE_ID || '/' || PL.LOCATION_ID || '/' || PL.QTY || ' '
FROM PART_LOCATION PL
INNER JOIN REQUIREMENT RQ
ON RQ.PART_ID = PL.PART_ID
AND ((RQ.WAREHOUSE_ID = PL.WAREHOUSE_ID) OR
(PL.WAREHOUSE_ID ='COMMON' AND PL.LOCATION_ID = 'AUTOISSUE')
)
WHERE PL.QTY > 0
WITH READ ONLY;
GRANT SELECT ON SYSADM.L3_PART_LOCATION_QTY_V TO PUBLIC;
COMMIT;
EXTENDED QUERY:
'SELECT PLVW.PL_WHSE_LOC_QTY FROM L3_PART_LOCATION_QTY_V PLVW, REQUIREMENT RQ WHERE PLVW.PL_PART_ID = RQ.PART_ID AND PLVW.PL_PART_ID = :RQ_PART_ID AND PLVW.PL_QTY > 0 INTO :PLVW_WHSE_LOC_QTY'
QRP FORM:
I added a cell to the QRP form to display PLVW_WHSE_LOC_QTY.