PV_PERF_VTN2_VW(SQL View) |
Index Back |
---|
SELECT A.SETID ,A.INV_ITEM_ID ,A.VENDOR_SETID ,A.VENDOR_ID ,A.CATEGORY_ID ,A.UNIT_MEASURE_STD ,G.UNIT_OF_MEASURE ,A.DESCR ,A.DESCR60 ,A.ITM_ID_VNDR ,A.VNDR_CATALOG_ID ,A.TREE_NAME ,A.PRICE_LIST ,A.ITM_VNDR_PRIORITY ,A.CURRENCY_CD_BASE ,A.VNDR_NAME1 ,G.EFFDT ,G.VNDR_LOC ,G.PRICE_VNDR ,G.CURRENCY_CD FROM PS_PV_PERF_VTN1_VW A , PS_ITM_VNDR_UOM_PR G WHERE A.SETID = G.SETID AND A.INV_ITEM_ID= G.INV_ITEM_ID AND A.VENDOR_SETID = G.VENDOR_SETID AND A.VENDOR_ID = G.VENDOR_ID AND A.VNDR_LOC = G.VNDR_LOC AND G.EFFDT = ( SELECT MAX(EFFDT) FROM PS_ITM_VNDR_UOM_PR WHERE SETID = G.SETID AND INV_ITEM_ID = G.INV_ITEM_ID AND VENDOR_ID = G.VENDOR_ID AND VENDOR_SETID = G.VENDOR_SETID AND VNDR_LOC = G.VNDR_LOC AND UNIT_OF_MEASURE = G.UNIT_OF_MEASURE AND CURRENCY_CD = G.CURRENCY_CD AND QTY_MIN = G.QTY_MIN AND EFF_STATUS = 'A' AND EFFDT <= %CurrentDateIn ) AND G.UNIT_OF_MEASURE = ( SELECT U.UNIT_OF_MEASURE FROM PS_ITM_VNDR_UOM U WHERE G.VENDOR_SETID = U.VENDOR_SETID AND G.VENDOR_ID = U.VENDOR_ID AND G.SETID = U.SETID AND G.INV_ITEM_ID = U.INV_ITEM_ID AND G.VNDR_LOC = U.VNDR_LOC AND U.DFLT_UOM = 'Y') AND G.CURRENCY_CD = ( SELECT MAX(W.CURRENCY_CD) FROM PS_ITM_VNDR_UOM_PR W WHERE G.VENDOR_SETID = W.VENDOR_SETID AND G.VENDOR_ID = W.VENDOR_ID AND G.SETID = W.SETID AND G.INV_ITEM_ID = W.INV_ITEM_ID AND G.VNDR_LOC = W.VNDR_LOC AND G.UNIT_OF_MEASURE = W.UNIT_OF_MEASURE AND G.QTY_MIN = W.QTY_MIN) AND G.VNDR_LOC = ( SELECT VNDR_LOC FROM PS_VENDOR_LOC L WHERE G.VENDOR_SETID = L.SETID AND G.VENDOR_ID = L.VENDOR_ID AND G.VNDR_LOC = L.VNDR_LOC AND EFFDT =( SELECT MAX(EFFDT) FROM PS_VENDOR_LOC WHERE SETID = L.SETID AND VENDOR_ID = L.VENDOR_ID AND VNDR_LOC = L.VNDR_LOC AND EFF_STATUS = 'A' AND EFFDT <= %CurrentDateIn )) AND G.QTY_MIN = ( SELECT MIN(QTY_MIN) FROM PS_ITM_VNDR_UOM_PR WHERE SETID = G.SETID AND INV_ITEM_ID = G.INV_ITEM_ID AND VENDOR_ID = G.VENDOR_ID AND VENDOR_SETID = G.VENDOR_SETID AND VNDR_LOC = G.VNDR_LOC AND UNIT_OF_MEASURE = G.UNIT_OF_MEASURE AND EFFDT <= %CurrentDateIn) UNION SELECT A.SETID ,A.INV_ITEM_ID ,A.VENDOR_SETID ,A.VENDOR_ID ,A.CATEGORY_ID ,A.UNIT_MEASURE_STD ,CAST(NULL AS CHAR(3)) ,A.DESCR ,A.DESCR60 ,A.ITM_ID_VNDR ,A.VNDR_CATALOG_ID ,A.TREE_NAME ,A.PRICE_LIST ,A.ITM_VNDR_PRIORITY ,A.CURRENCY_CD_BASE ,A.VNDR_NAME1 ,CAST(NULL AS DATE) ,CAST(NULL AS CHAR(10)) ,0 ,CAST(NULL AS CHAR(3)) FROM PS_PV_PERF_VTN1_VW A WHERE NOT EXISTS ( SELECT 'X' FROM PS_ITM_VNDR_UOM_PR G WHERE A.SETID = G.SETID AND A.INV_ITEM_ID= G.INV_ITEM_ID AND A.VENDOR_SETID = G.VENDOR_SETID AND A.VENDOR_ID = G.VENDOR_ID AND A.VNDR_LOC = G.VNDR_LOC AND G.EFFDT <= ( SELECT MAX(EFFDT) FROM PS_ITM_VNDR_UOM_PR WHERE SETID = G.SETID AND INV_ITEM_ID = G.INV_ITEM_ID AND VENDOR_ID = G.VENDOR_ID AND VENDOR_SETID = G.VENDOR_SETID AND VNDR_LOC = G.VNDR_LOC AND UNIT_OF_MEASURE = G.UNIT_OF_MEASURE AND CURRENCY_CD = G.CURRENCY_CD AND QTY_MIN = G.QTY_MIN AND EFF_STATUS = 'A' AND EFFDT <= %CurrentDateIn ) AND G.UNIT_OF_MEASURE = ( SELECT U.UNIT_OF_MEASURE FROM PS_ITM_VNDR_UOM U WHERE G.VENDOR_SETID = U.VENDOR_SETID AND G.VENDOR_ID = U.VENDOR_ID AND G.SETID = U.SETID AND G.INV_ITEM_ID = U.INV_ITEM_ID AND G.VNDR_LOC = U.VNDR_LOC AND U.DFLT_UOM = 'Y') AND G.CURRENCY_CD = ( SELECT MAX(W.CURRENCY_CD) FROM PS_ITM_VNDR_UOM_PR W WHERE G.VENDOR_SETID = W.VENDOR_SETID AND G.VENDOR_ID = W.VENDOR_ID AND G.SETID = W.SETID AND G.INV_ITEM_ID = W.INV_ITEM_ID AND G.VNDR_LOC = W.VNDR_LOC AND G.UNIT_OF_MEASURE = W.UNIT_OF_MEASURE AND G.QTY_MIN = W.QTY_MIN) AND G.VNDR_LOC = ( SELECT VNDR_LOC FROM PS_VENDOR_LOC L WHERE G.VENDOR_SETID = L.SETID AND G.VENDOR_ID = L.VENDOR_ID AND G.VNDR_LOC = L.VNDR_LOC AND EFFDT =( SELECT MAX(EFFDT) FROM PS_VENDOR_LOC WHERE SETID = L.SETID AND VENDOR_ID = L.VENDOR_ID AND VNDR_LOC = L.VNDR_LOC AND EFF_STATUS = 'A' AND EFFDT <= %CurrentDateIn )) AND G.QTY_MIN = ( SELECT MIN(QTY_MIN) FROM PS_ITM_VNDR_UOM_PR WHERE SETID = G.SETID AND INV_ITEM_ID = G.INV_ITEM_ID AND VENDOR_ID = G.VENDOR_ID AND VENDOR_SETID = G.VENDOR_SETID AND VNDR_LOC = G.VNDR_LOC AND UNIT_OF_MEASURE = G.UNIT_OF_MEASURE AND EFFDT <= %CurrentDateIn)) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
2 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
3 | VENDOR_SETID | Character(5) | VARCHAR2(5) NOT NULL | Vendor SetID |
4 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
5 | CATEGORY_ID | Character(5) | VARCHAR2(5) NOT NULL | Category ID |
6 | UNIT_MEASURE_STD | Character(3) | VARCHAR2(3) NOT NULL | Standard Unit of Measure |
7 | UNIT_OF_MEASURE | Character(3) | VARCHAR2(3) NOT NULL |
Used on an approval rule set.
MHR=Muti Hourly PER=Percentage SQF=Square Footage |
8 | DESCR | Character(30) | VARCHAR2(30) NOT NULL | Description |
9 | DESCR60 | Character(60) | VARCHAR2(60) NOT NULL | Description |
10 | ITM_ID_VNDR | Character(50) | VARCHAR2(50) NOT NULL | Vendor Item ID |
11 | VNDR_CATALOG_ID | Character(20) | VARCHAR2(20) NOT NULL | Vendor's Catalog Number |
12 | TREE_NAME | Character(18) | VARCHAR2(18) NOT NULL | Tree Name |
13 | PRICE_LIST | Number(16,5) | DECIMAL(15,5) NOT NULL | Standard Price |
14 | ITM_VNDR_PRIORITY | Number(3,0) | SMALLINT NOT NULL | Item Vendor Priority |
15 | CURRENCY_CD_BASE | Character(3) | VARCHAR2(3) NOT NULL | Business Unit Base Currency |
16 | VNDR_NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Supplier Name |
17 | EFFDT | Date(10) | DATE |
Effective Date
Default Value: %date |
18 | VNDR_LOC | Character(10) | VARCHAR2(10) NOT NULL | Vendor Location |
19 | PRICE_VNDR | Number(16,5) | DECIMAL(15,5) NOT NULL | Vendor Price |
20 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |