PV_VER_VNDR_VW

(SQL View)
Index Back

SELECT A.SETID ,A.INV_ITEM_ID ,A.VENDOR_SETID ,A.VENDOR_ID ,A.ITM_ID_VNDR ,A.VNDR_CATALOG_ID ,A.ITM_VNDR_PRIORITY ,V.NAME1 ,V.VNDR_STATUS_PO ,G.VNDR_LOC ,G.UNIT_OF_MEASURE ,G.CURRENCY_CD ,G.PRICE_VNDR FROM PS_ITM_VENDOR A , PS_ITM_VNDR_UOM_PR G , PS_VENDOR V 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 G.EFF_STATUS = 'A' 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 UNIT_OF_MEASURE = G.UNIT_OF_MEASURE 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.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 EFFDT <= %CurrentDateIn ) AND EFF_STATUS = 'A') AND A.VENDOR_SETID = V.SETID AND A.VENDOR_ID = V.VENDOR_ID AND V.VENDOR_STATUS = 'A' AND A.ITM_STATUS = 'A') UNION SELECT A.SETID ,A.INV_ITEM_ID ,A.VENDOR_SETID ,A.VENDOR_ID ,A.ITM_ID_VNDR ,A.VNDR_CATALOG_ID ,A.ITM_VNDR_PRIORITY ,V.NAME1 ,V.VNDR_STATUS_PO ,CAST(NULL AS CHAR(10)) ,CAST(NULL AS CHAR(3)) ,CAST(NULL AS CHAR(3)) ,0 FROM PS_ITM_VENDOR A , PS_VENDOR V WHERE A.VENDOR_SETID = V.SETID AND A.VENDOR_ID = V.VENDOR_ID AND V.VENDOR_STATUS = 'A' AND A.ITM_STATUS = 'A' AND 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 G.EFF_STATUS = 'A' 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 UNIT_OF_MEASURE = G.UNIT_OF_MEASURE 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.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 EFFDT <= %CurrentDateIn ) AND EFF_STATUS = 'A')))

# 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 ITM_ID_VNDR Character(50) VARCHAR2(50) NOT NULL Vendor Item ID
6 VNDR_CATALOG_ID Character(20) VARCHAR2(20) NOT NULL Vendor's Catalog Number
7 ITM_VNDR_PRIORITY Number(3,0) SMALLINT NOT NULL Item Vendor Priority
8 VNDR_NAME1 Character(40) VARCHAR2(40) NOT NULL Supplier Name
9 VNDR_STATUS_PO Character(1) VARCHAR2(1) NOT NULL Open For Ordering
N=No
Y=Yes
10 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
11 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
12 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
13 PRICE_VNDR Number(16,5) DECIMAL(15,5) NOT NULL Vendor Price