AP_VCHR_ATA_CNT(SQL View) |
Index Back |
---|---|
Voucher Attachment countAttachment Count View |
SELECT A.BUSINESS_UNIT , A.VOUCHER_ID , A.APPR_STATUS , COUNT(*) FROM PS_VOUCHER A , PS_AP_VCHR_ATT B WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.VOUCHER_ID = B.VOUCHER_ID AND B.SHOW_APPROVAL = 'Y' GROUP BY A.BUSINESS_UNIT, A.VOUCHER_ID, A.APPR_STATUS UNION SELECT C.BUSINESS_UNIT , C.VOUCHER_ID , C.APPR_STATUS , 0 FROM PS_VOUCHER C WHERE NOT EXISTS ( SELECT 'X' FROM PS_AP_VCHR_ATT D WHERE D.BUSINESS_UNIT = C.BUSINESS_UNIT AND D.VOUCHER_ID = C.VOUCHER_ID AND D.SHOW_APPROVAL = 'Y') |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | VOUCHER_ID | Character(8) | VARCHAR2(8) NOT NULL | Voucher ID |
3 | APPR_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Approval status flag used on appr_inst_log and derived records to track virtual approver status
A=Approved D=Denied P=Pending |
4 | ATTACHMENT_NUM | Number(5,0) | INTEGER NOT NULL | Attachment Number |