Below I have 2 exact same queries
1st one is generated via python code 2nd is export data as insert from oracle sqldeveloper
While second query inserts data properly ,first query is giving missing expression error
Queries
INSERT INTO NCSUSR.COLL_CLIENT_SUBMISSION_DTLS (ccsd_id, ccsd_file_id, ccsd_batch_dt, ccsd_cm_id, ccsd_cm_pan_no, ccsd_tm_id, ccsd_tm_pan_no,ccsd_cp_code, ccsd_cp_pan_no, ccsd_cli_cd, ccsd_cli_pan_no, ccsd_account_type, ccsd_segment_indicator, ccsd_ucc, ccsd_cp_fin_ledger_bal_a, ccsd_cp_fin_ledger_bal_b, ccsd_cp_fin_peak_ledger_bal_c, ccsd_cp_bg, ccsd_cp_fdr, ccsd_cp_apr_sec_cash_com, ccsd_cp_apr_sec_non_cash_com, ccsd_cp_non_apr_sec, ccsd_cp_cc_apr_comm, ccsd_cp_othr_coll, ccsd_tm_cred_enty_ledger_epi, ccsd_tm_pool_account, ccsd_tm_cash_retained, ccsd_tm_bg, ccsd_tm_fdr, ccsd_tm_apr_sec_cash_com, ccsd_tm_apr_sec_non_cash_com, ccsd_tm_non_apr_sec, ccsd_tm_cc_apr_comm, ccsd_tm_othr_coll, ccsd_cm_cash_placed, ccsd_cm_bg, ccsd_cm_fdr, ccsd_cm_apr_sec_cash_com, ccsd_cm_apr_sec_non_cash_com, ccsd_cm_non_apr_sec, ccsd_cm_cc_apr_comm, ccsd_cm_othr_coll, ccsd_cm_cash_retained, ccsd_cm_rtd_bg, ccsd_cm_rtd_fdr, ccsd_cm_rtd_apr_sec_cash_com, ccsd_cm_rtd_apr_sec_n_cash_com, ccsd_cm_rtd_non_apr_sec, ccsd_cm_rtd_cc_apr_comm, ccsd_cm_rtd_othr_coll, ccsd_nccl_cash_placed, ccsd_nccl_bg, ccsd_nccl_fdr, ccsd_nccl_apr_sec_cash_com, ccsd_nccl_aprv_sec_non_cash_com, ccsd_nccl_cc_apr_comm, ccsd_email_flag, ccsd_sms_flag, ccsd_status, ccsd_created_dt, ccsd_created_by, ccsd_modified_dt, ccsd_modified_by) VALUES {3,12345678,to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'A1017','BCIPB1234B','01266','BCIPB1234T','NCDXPRE01',null,null,'BCIPB1234M','P','CM',null,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,'N','N','Y',to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'SYSTEM',null,null};
INSERT INTO NCSUSR.COLL_CLIENT_SUBMISSION_DTLS (ccsd_id, ccsd_file_id, ccsd_batch_dt, ccsd_cm_id, ccsd_cm_pan_no, ccsd_tm_id, ccsd_tm_pan_no,ccsd_cp_code, ccsd_cp_pan_no, ccsd_cli_cd, ccsd_cli_pan_no, ccsd_account_type, ccsd_segment_indicator, ccsd_ucc, ccsd_cp_fin_ledger_bal_a, ccsd_cp_fin_ledger_bal_b, ccsd_cp_fin_peak_ledger_bal_c, ccsd_cp_bg, ccsd_cp_fdr, ccsd_cp_apr_sec_cash_com, ccsd_cp_apr_sec_non_cash_com, ccsd_cp_non_apr_sec, ccsd_cp_cc_apr_comm, ccsd_cp_othr_coll, ccsd_tm_cred_enty_ledger_epi, ccsd_tm_pool_account, ccsd_tm_cash_retained, ccsd_tm_bg, ccsd_tm_fdr, ccsd_tm_apr_sec_cash_com, ccsd_tm_apr_sec_non_cash_com, ccsd_tm_non_apr_sec, ccsd_tm_cc_apr_comm, ccsd_tm_othr_coll, ccsd_cm_cash_placed, ccsd_cm_bg, ccsd_cm_fdr, ccsd_cm_apr_sec_cash_com, ccsd_cm_apr_sec_non_cash_com, ccsd_cm_non_apr_sec, ccsd_cm_cc_apr_comm, ccsd_cm_othr_coll, ccsd_cm_cash_retained, ccsd_cm_rtd_bg, ccsd_cm_rtd_fdr, ccsd_cm_rtd_apr_sec_cash_com, ccsd_cm_rtd_apr_sec_n_cash_com, ccsd_cm_rtd_non_apr_sec, ccsd_cm_rtd_cc_apr_comm, ccsd_cm_rtd_othr_coll, ccsd_nccl_cash_placed, ccsd_nccl_bg, ccsd_nccl_fdr, ccsd_nccl_apr_sec_cash_com, ccsd_nccl_aprv_sec_non_cash_com, ccsd_nccl_cc_apr_comm, ccsd_email_flag, ccsd_sms_flag, ccsd_status, ccsd_created_dt, ccsd_created_by, ccsd_modified_dt, ccsd_modified_by) VALUES (3,12345678,to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'A1017','BCIPB1234B','01266','BCIPB1234T','NCDXPRE01',null,null,'BCIPB1234M','P','CM',null,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,'N','N','Y',to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'SYSTEM',null,null);
Error Getting for 1st Query :
Error starting at line 1 in command:
INSERT INTO NCSUSR.COLL_CLIENT_SUBMISSION_DTLS (ccsd_id, ccsd_file_id, ccsd_batch_dt, ccsd_cm_id, ccsd_cm_pan_no, ccsd_tm_id, ccsd_tm_pan_no,ccsd_cp_code, ccsd_cp_pan_no, ccsd_cli_cd, ccsd_cli_pan_no, ccsd_account_type, ccsd_segment_indicator, ccsd_ucc, ccsd_cp_fin_ledger_bal_a, ccsd_cp_fin_ledger_bal_b, ccsd_cp_fin_peak_ledger_bal_c, ccsd_cp_bg, ccsd_cp_fdr, ccsd_cp_apr_sec_cash_com, ccsd_cp_apr_sec_non_cash_com, ccsd_cp_non_apr_sec, ccsd_cp_cc_apr_comm, ccsd_cp_othr_coll, ccsd_tm_cred_enty_ledger_epi, ccsd_tm_pool_account, ccsd_tm_cash_retained, ccsd_tm_bg, ccsd_tm_fdr, ccsd_tm_apr_sec_cash_com, ccsd_tm_apr_sec_non_cash_com, ccsd_tm_non_apr_sec, ccsd_tm_cc_apr_comm, ccsd_tm_othr_coll, ccsd_cm_cash_placed, ccsd_cm_bg, ccsd_cm_fdr, ccsd_cm_apr_sec_cash_com, ccsd_cm_apr_sec_non_cash_com, ccsd_cm_non_apr_sec, ccsd_cm_cc_apr_comm, ccsd_cm_othr_coll, ccsd_cm_cash_retained, ccsd_cm_rtd_bg, ccsd_cm_rtd_fdr, ccsd_cm_rtd_apr_sec_cash_com, ccsd_cm_rtd_apr_sec_n_cash_com, ccsd_cm_rtd_non_apr_sec, ccsd_cm_rtd_cc_apr_comm, ccsd_cm_rtd_othr_coll, ccsd_nccl_cash_placed, ccsd_nccl_bg, ccsd_nccl_fdr, ccsd_nccl_apr_sec_cash_com, ccsd_nccl_aprv_sec_non_cash_com, ccsd_nccl_cc_apr_comm, ccsd_email_flag, ccsd_sms_flag, ccsd_status, ccsd_created_dt, ccsd_created_by, ccsd_modified_dt, ccsd_modified_by) VALUES {3,12345678,to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'A1017','BCIPB1234B','01266','BCIPB1234T','NCDXPRE01',null,null,'BCIPB1234M','P','CM',null,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,'N','N','Y',to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'SYSTEM',null,null}
Error at Command Line:1 Column:1,308
Error report:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:
CodePudding user response:
There is a }
at the end of the first insert, instead of )
It should be
INSERT INTO NCSUSR.COLL_CLIENT_SUBMISSION_DTLS (ccsd_id, ccsd_file_id, ccsd_batch_dt, ccsd_cm_id, ccsd_cm_pan_no, ccsd_tm_id, ccsd_tm_pan_no,ccsd_cp_code, ccsd_cp_pan_no, ccsd_cli_cd, ccsd_cli_pan_no, ccsd_account_type, ccsd_segment_indicator, ccsd_ucc, ccsd_cp_fin_ledger_bal_a, ccsd_cp_fin_ledger_bal_b, ccsd_cp_fin_peak_ledger_bal_c, ccsd_cp_bg, ccsd_cp_fdr, ccsd_cp_apr_sec_cash_com, ccsd_cp_apr_sec_non_cash_com, ccsd_cp_non_apr_sec, ccsd_cp_cc_apr_comm, ccsd_cp_othr_coll, ccsd_tm_cred_enty_ledger_epi, ccsd_tm_pool_account, ccsd_tm_cash_retained, ccsd_tm_bg, ccsd_tm_fdr, ccsd_tm_apr_sec_cash_com, ccsd_tm_apr_sec_non_cash_com, ccsd_tm_non_apr_sec, ccsd_tm_cc_apr_comm, ccsd_tm_othr_coll, ccsd_cm_cash_placed, ccsd_cm_bg, ccsd_cm_fdr, ccsd_cm_apr_sec_cash_com, ccsd_cm_apr_sec_non_cash_com, ccsd_cm_non_apr_sec, ccsd_cm_cc_apr_comm, ccsd_cm_othr_coll, ccsd_cm_cash_retained, ccsd_cm_rtd_bg, ccsd_cm_rtd_fdr, ccsd_cm_rtd_apr_sec_cash_com, ccsd_cm_rtd_apr_sec_n_cash_com, ccsd_cm_rtd_non_apr_sec, ccsd_cm_rtd_cc_apr_comm, ccsd_cm_rtd_othr_coll, ccsd_nccl_cash_placed, ccsd_nccl_bg, ccsd_nccl_fdr, ccsd_nccl_apr_sec_cash_com, ccsd_nccl_aprv_sec_non_cash_com, ccsd_nccl_cc_apr_comm, ccsd_email_flag, ccsd_sms_flag, ccsd_status, ccsd_created_dt, ccsd_created_by, ccsd_modified_dt, ccsd_modified_by) VALUES {3,12345678,to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'A1017','BCIPB1234B','01266','BCIPB1234T','NCDXPRE01',null,null,'BCIPB1234M','P','CM',null,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,'N','N','Y',to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'SYSTEM',null,null);
INSERT INTO NCSUSR.COLL_CLIENT_SUBMISSION_DTLS (ccsd_id, ccsd_file_id, ccsd_batch_dt, ccsd_cm_id, ccsd_cm_pan_no, ccsd_tm_id, ccsd_tm_pan_no,ccsd_cp_code, ccsd_cp_pan_no, ccsd_cli_cd, ccsd_cli_pan_no, ccsd_account_type, ccsd_segment_indicator, ccsd_ucc, ccsd_cp_fin_ledger_bal_a, ccsd_cp_fin_ledger_bal_b, ccsd_cp_fin_peak_ledger_bal_c, ccsd_cp_bg, ccsd_cp_fdr, ccsd_cp_apr_sec_cash_com, ccsd_cp_apr_sec_non_cash_com, ccsd_cp_non_apr_sec, ccsd_cp_cc_apr_comm, ccsd_cp_othr_coll, ccsd_tm_cred_enty_ledger_epi, ccsd_tm_pool_account, ccsd_tm_cash_retained, ccsd_tm_bg, ccsd_tm_fdr, ccsd_tm_apr_sec_cash_com, ccsd_tm_apr_sec_non_cash_com, ccsd_tm_non_apr_sec, ccsd_tm_cc_apr_comm, ccsd_tm_othr_coll, ccsd_cm_cash_placed, ccsd_cm_bg, ccsd_cm_fdr, ccsd_cm_apr_sec_cash_com, ccsd_cm_apr_sec_non_cash_com, ccsd_cm_non_apr_sec, ccsd_cm_cc_apr_comm, ccsd_cm_othr_coll, ccsd_cm_cash_retained, ccsd_cm_rtd_bg, ccsd_cm_rtd_fdr, ccsd_cm_rtd_apr_sec_cash_com, ccsd_cm_rtd_apr_sec_n_cash_com, ccsd_cm_rtd_non_apr_sec, ccsd_cm_rtd_cc_apr_comm, ccsd_cm_rtd_othr_coll, ccsd_nccl_cash_placed, ccsd_nccl_bg, ccsd_nccl_fdr, ccsd_nccl_apr_sec_cash_com, ccsd_nccl_aprv_sec_non_cash_com, ccsd_nccl_cc_apr_comm, ccsd_email_flag, ccsd_sms_flag, ccsd_status, ccsd_created_dt, ccsd_created_by, ccsd_modified_dt, ccsd_modified_by) VALUES (3,12345678,to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'A1017','BCIPB1234B','01266','BCIPB1234T','NCDXPRE01',null,null,'BCIPB1234M','P','CM',null,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,'N','N','Y',to_timestamp('16-SEP-21','DD-MON-RR HH.MI.SSXFF AM'),'SYSTEM',null,null);