I am running a process and it failed on ORA-01400: cannot insert NULL into (...table.field)
When I run the same sql in SQL plus or TOAD, I don't have an issue. On top of that, the sql returns no rows.
I have tried many different ways to solve with no success.
Did anyone encounter an issue like this ?
Please help.
Thanks!
Message was edited by: user5070624 Here is the sql: insert into table_1 SELECT A.BUSINESS_UNIT, A.VOUCHER_ID, 0, A.INVOICE_ID, NVL(LTRIM(regexp_replace(A.INVOICE_ID , '[^0-9]' , '') ,0),' ') , A.INVOICE_DT, A.VENDOR_ID, A.ORIGIN, A.ENDORSER_PARTY, A.ECQUEUEINSTANCE, A.ECTRANSID, A.ENTERED_DT, A.VNDR_LOC, A.GROSS_AMT, A.POLICY_NUM, A.PACKSLIP_NO , NVL(( SELECT C.PRODUCT FROM PS_VENDOR B,tab_cLASS C WHERE B.SETID = 'SHARE' AND B.VENDOR_ID = A.VENDOR_ID AND B.VENDOR_CLASS = C.VENDOR_CLASS ),' '), ( SELECT B.VENDOR_CLASS FROM PS_VENDOR B WHERE B.SETID = 'SHARE' and B.VENDOR_ID = A.VENDOR_ID ) , A.ACCOUNTING_DT FROM PS_VOUCHER A WHERE A.BUSINESS_UNIT= 'abced' AND A.ENTRY_STATUS='P' AND TO_DATE(A.ACCOUNTING_DT,'YYYY-MM-DD') >=TO_DATE('2016-02-02','YYYY-MM-DD') AND A.VOUCHER_ID NOT IN ( SELECT VOUCHER_ID FROM bc_xls_VCHR ) AND A. ECTRANSID NOT IN ('ghi') AND VENDOR_ID NOT IN ('0000000001' ,'00000000002' ,'0000000003')
This sql returns no row The error is SQL Error: ORA-01400: cannot insert NULL into ("PSSYFNU"." table_1"."VENDOR_CLASS")
Message was edited by: user5070624