BI_CU_SNT_EC_VW

(SQL View)
Index Back

BI Cust Standard Notes EC VW


SELECT H.BUSINESS_UNIT , H.INVOICE , CNOTE.SEQ_NUM , SNOTE.NOTE_TYPE , SNOTE.TEXT254 , SNOTE.STD_NOTE_CD FROM PS_CUST_NOTE CNOTE, PS_BI_HDR H , PS_STD_NOTE SNOTE, PS_STD_NOTE_DOC SDOC WHERE H.BILL_STATUS = 'INV' AND H.BILL_TO_MEDIA = 'E' AND CNOTE.CUST_ID = H.BILL_TO_CUST_ID AND SNOTE.SETID = SDOC.SETID AND SNOTE.STD_NOTE_CD = SDOC.STD_NOTE_CD AND SNOTE.EFFDT = SDOC.EFFDT AND SDOC.DOCUMENT_CD = 'INVC' AND CNOTE.SETID = SNOTE.SETID AND CNOTE.STD_NOTE_CD = SNOTE.STD_NOTE_CD AND SNOTE.EFFDT = (SELECT MAX(EFFDT) FROM PS_STD_NOTE WHERE SETID=SNOTE.SETID AND STD_NOTE_CD = SNOTE.STD_NOTE_CD AND EFFDT <= H.INVOICE_DT) AND SNOTE.EFF_STATUS='A'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 INVOICE Character(22) VARCHAR2(22) NOT NULL Invoice
3 NOTES_SEQ_NUM Number(3,0) SMALLINT NOT NULL Notes Sequence Num
4 NOTE_TYPE Character(10) VARCHAR2(10) NOT NULL Note Type
5 TEXT254 Character(254) VARCHAR2(254) NOT NULL Text
6 STD_NOTE_CD Character(10) VARCHAR2(10) NOT NULL Standard Note Code