EX_AIR_MRCHT_VW

(SQL View)
Index Back

Preferred Merchant Table View

View of preferred suppliers or merchants that are most utilized by a company. Retrieves particular merchants depending on the type of expense type selected.

SELECT A.SETID , A.EXPENSE_TYPE , C.MERCHANT_CD , B.DESCR , B.DESCRSHORT FROM PS_EX_TYPES_TBL A , PS_EX_MERCHANT_TBL B , PS_EX_TYPE_MERCHNT C WHERE A.EXPENSE_TYPE_EDIT = 'AIR' AND A.EFFDT = ( SELECT MAX(A1.EFFDT) FROM PS_EX_TYPES_TBL A1 WHERE A1.SETID = A.SETID AND A1.EXPENSE_TYPE = A.EXPENSE_TYPE AND A1.EFFDT <= %CurrentDateIn) AND A.EFF_STATUS = 'A' AND A.SETID = C.SETID AND A.EXPENSE_TYPE = C.EXPENSE_TYPE AND A.EFFDT = C.EFFDT AND C.SETID = B.SETID AND C.MERCHANT_CD = B.MERCHANT_CD AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_EX_MERCHANT_TBL B1 WHERE B1.SETID = B.SETID AND B1.MERCHANT_CD = B.MERCHANT_CD AND B1.EFFDT <= %CurrentDateIn) AND B.EFF_STATUS = 'A'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID

Default Value: OPR_DEF_TBL_FS.SETID

Prompt Table: SP_SETID_NONVW

2 EXPENSE_TYPE Character(7) VARCHAR2(7) NOT NULL Expense Type
3 MERCHANT_CD Character(10) VARCHAR2(10) NOT NULL Preferred Merchant
4 DESCR Character(30) VARCHAR2(30) NOT NULL Description
5 DESCRSHORT Character(10) VARCHAR2(10) NOT NULL Short Description