1 | CREATE OR REPLACE TYPE "SOAADM" . "AP_INVOICES_IF_T" AS OBJECT ( |
2 | INVOICE_ID NUMBER, |
3 | INVOICE_NUM VARCHAR2(50 BYTE), |
4 | INVOICE_TYPE_LOOKUP_CODE VARCHAR2(25 BYTE), |
5 | INVOICE_DATE DATE , |
6 | VENDOR_ID NUMBER |
7 | ) |
8 |
9 | CREATE OR REPLACE TYPE "SOAADM" . "AP_INVOICES_IF_TBL_T" AS TABLE OF AP_INVOICES_IF_T; |
Ahora probamos con el siguiente script como saber si se pobló de manera correcta:
01 | declare |
02 | v_ap_if_tbl AP_INVOICES_IF_TBL_T; |
03 | v_ap_if_t AP_INVOICES_IF_T; |
04 | v_count number; |
05 | begin |
06 | v_ap_if_t.INVOICE_ID:=1; |
07 | v_ap_if_tbl := AP_INVOICES_IF_TBL_T(v_ap_if_t); |
08 | select count (*) into v_count from table ( cast (v_ap_if_tbl as AP_INVOICES_IF_TBL_T); |
09 | dbms_output.put_line( 'length: ' ||v_count); |
10 | end ; |
No comments:
Post a Comment