AB_CREDITCP_VW(SQL View) |
Index Back |
---|---|
Action List Credit - Corp Vw |
select C.corporate_setid, C.corporate_cust_id, C.name1, c.roleuser, sum(D.bal_amt), O.cr_limit, O.cr_limit_corp, O.cr_limit_rev_dt, O.cr_limit_range, C.currency_cd from ps_customer C, ps_cust_data D, PS_CUST_CREDIT O where c.cust_status = 'A' and c.bill_to_flg = 'Y' and c.cust_level <> 'P' and C.setid = ( SELECT setid from ps_set_cntrl_rec where setcntrlvalue = D.business_unit and recname = 'CUSTOMER' ) and C.cust_id = D.cust_id and O.setid = C.corporate_setid and O.cust_id = C.corporate_cust_id and O.effdt = ( select max(effdt) from PS_CUST_CREDIT where setid = O.setid and cust_id = O.cust_id and effdt <= %currentdatein and eff_status = 'A' ) group by C.corporate_setid, C.corporate_cust_id, C.name1, C.roleuser, O.cr_limit, O.cr_limit_corp, O.cr_limit_rev_dt, O.cr_limit_range, C.currency_cd |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | Character(5) | VARCHAR2(5) NOT NULL | SetID | |
2 | Character(15) | VARCHAR2(15) NOT NULL | Corporate Customer | |
3 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
4 | ROLEUSER | Character(30) | VARCHAR2(30) NOT NULL | Role User |
5 | BAL_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Item Balance |
6 | CR_LIMIT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Credit Limit |
7 | CR_LIMIT_CORP | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Corporate Credit Limit |
8 | CR_LIMIT_REV_DT | Date(10) | DATE | Credit Limit Review Date |
9 | CR_LIMIT_RANGE | Number(3,0) | SMALLINT NOT NULL | Limit Range % |
10 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |