SELECT QPLT.PRICE_LIST_ID ,
QPLT.NAME ,
QPLI.ITEM_ID ,
QPLB.CURRENCY_CODE,
QPLC.LAST_UPDATED_BY LAST_UPDATE_LOGIN,
(SELECT DISTINCT ITEM_NUMBER FROM EGP_SYSTEM_ITEMS ESI WHERE QPLI.ITEM_ID=ESI.INVENTORY_ITEM_ID) ITEM_NUMBER,
(SELECT DISTINCT DESCRIPTION FROM EGP_SYSTEM_ITEMS ESI WHERE QPLI.ITEM_ID=ESI.INVENTORY_ITEM_ID) DESCRIPTION,
QPLC.BASE_PRICE
FROM QP_PRICE_LISTS_TL QPLT ,
QP_PRICE_LISTS_ALL_B QPLB,
QP_PRICE_LIST_ITEMS QPLI,
QP_PRICE_LIST_CHARGES QPLC
WHERE QPLT.PRICE_LIST_ID = QPLI.PRICE_LIST_ID
AND QPLB.PRICE_LIST_ID=QPLI.PRICE_LIST_ID
AND QPLC.PARENT_ENTITY_ID (+) = QPLI.PRICE_LIST_ITEM_ID
AND QPLT.NAME=<PRICELISTNAME>
ORDER BY QPLT.NAME ,
QPLI.PRICE_LIST_ID,
QPLI.PRICE_LIST_ITEM_ID
QPLT.NAME ,
QPLI.ITEM_ID ,
QPLB.CURRENCY_CODE,
QPLC.LAST_UPDATED_BY LAST_UPDATE_LOGIN,
(SELECT DISTINCT ITEM_NUMBER FROM EGP_SYSTEM_ITEMS ESI WHERE QPLI.ITEM_ID=ESI.INVENTORY_ITEM_ID) ITEM_NUMBER,
(SELECT DISTINCT DESCRIPTION FROM EGP_SYSTEM_ITEMS ESI WHERE QPLI.ITEM_ID=ESI.INVENTORY_ITEM_ID) DESCRIPTION,
QPLC.BASE_PRICE
FROM QP_PRICE_LISTS_TL QPLT ,
QP_PRICE_LISTS_ALL_B QPLB,
QP_PRICE_LIST_ITEMS QPLI,
QP_PRICE_LIST_CHARGES QPLC
WHERE QPLT.PRICE_LIST_ID = QPLI.PRICE_LIST_ID
AND QPLB.PRICE_LIST_ID=QPLI.PRICE_LIST_ID
AND QPLC.PARENT_ENTITY_ID (+) = QPLI.PRICE_LIST_ITEM_ID
AND QPLT.NAME=<PRICELISTNAME>
ORDER BY QPLT.NAME ,
QPLI.PRICE_LIST_ID,
QPLI.PRICE_LIST_ITEM_ID
Muchas Gracias, Me sirvio Mucho
ReplyDelete