我正在尝试执行以下查询
insert into IOA_SETTLEMENT (version, CREATEDDATE, UPDATEDDATE, ENTITY_VERSION, SETY_ID, amount, curr_iso_code, part_id_rbsparty, ssin_id_rbsparty, ssin_id_counterparty, swift_ack_detail, SWIFT_TRANSACTION_ID, RESP_SWIFT_SINGLE, RESP_SWIFT_WITH_COVER, RESP_COVER_NOTE, si_type_counterparty, si_type_rbsparty, settlement_method, settlement_date, settlement_sent_date, manually_settled_flag, accounting_date, accounting_sent_date, RULE_ID, req_accounting_flag, stp_flag, part_id_counterparty, WQTY_CODE_CURRENT, ADVI_ID, locked_down_flag, TRANS_ERROR_CODE, VCO_FLAG, DTCC_LOCKED_DOWN_FLAG, DEADLINE_FLAG, INTERNAL_FLAG, CREATED_BY, dispatchdate, CLS_ELIGIBILITY_FLAG, HIGH_LEVEL_PRODUCT, USER_NOTE, overridden_release_time, overridden_cutoff_time, id) values
(0, '2016-11-02 14:23:09', '2016-11-02 14:23:09', 1,3, '-120.0','USD','29657030', null, null, null, null, null, null, null, 'STD', 'STD', 'SWIFT', '02 November 2016',
null, 'false', '02 November 2016', null, null, 'true', 'true', '29657030', 'BrokerageDraftSettlementWFQueue', null,'false', null, 'false', 'false', 'false','false', 'bro_auth', '2016-11-02 14:00:00', 'false', null, null, null, null, 220884310)
下面是表格结构
Name Null Type
------------------------------ -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ID NOT NULL NUMBER(32)
VERSION NOT NULL NUMBER(20)
CREATEDDATE NOT NULL TIMESTAMP(6)
UPDATEDDATE TIMESTAMP(6)
SETY_ID NOT NULL NUMBER(32)
AMOUNT NOT NULL NUMBER(25,5)
CURR_ISO_CODE NOT NULL VARCHAR2(3)
PART_ID_RBSPARTY NOT NULL NUMBER(32)
SSIN_ID_RBSPARTY NUMBER(32)
SI_TYPE_RBSPARTY NOT NULL VARCHAR2(20)
SSIN_ID_COUNTERPARTY NUMBER(32)
SI_TYPE_COUNTERPARTY NOT NULL VARCHAR2(20)
PART_ID_COUNTERPARTY NOT NULL NUMBER(32)
TEMP_SI_ID_RBSPARTY NUMBER(32)
TEMP_SI_ID_COUNTERPARTY NUMBER(32)
SETTLEMENT_METHOD VARCHAR2(20)
SETTLEMENT_DATE NOT NULL DATE
SETTLEMENT_SENT_DATE TIMESTAMP(6)
ACCOUNTING_DATE DATE
ACCOUNTING_SENT_DATE DATE
MANUALLY_SETTLED_FLAG NOT NULL CHAR(1)
MANUALLY_ACCOUNTED_FLAG NOT NULL CHAR(1)
REQ_ACCOUNTING_FLAG NOT NULL CHAR(1)
STP_FLAG NOT NULL VARCHAR2(1)
RULE_ID NUMBER(32)
ADVI_ID NUMBER(32)
WQTY_CODE_CURRENT NOT NULL VARCHAR2(100)
LOCKED_DOWN_FLAG CHAR(1)
TOKEN_OWNER VARCHAR2(3)
TRANS_ERROR_CODE VARCHAR2(10)
VCO_FLAG NOT NULL CHAR(1)
DTCC_LOCKED_DOWN_FLAG NOT NULL CHAR(1)
DEADLINE_FLAG NOT NULL CHAR(1)
SWIFT_ACK_DETAIL VARCHAR2(1000)
SWIFT_TRANSACTION_ID VARCHAR2(20)
RESP_SWIFT_SINGLE VARCHAR2(20)
RESP_COVER_NOTE VARCHAR2(20)
RESP_SWIFT_WITH_COVER VARCHAR2(20)
INTERNAL_FLAG NOT NULL CHAR(1)
CREATED_BY NOT NULL VARCHAR2(30)
DISPATCHDATE TIMESTAMP(6)
ENTITY_VERSION NOT NULL NUMBER(20)
CLS_ELIGIBILITY_FLAG NOT NULL CHAR(1)
HIGH_LEVEL_PRODUCT VARCHAR2(20)
OVERRIDDEN_RELEASE_TIME TIMESTAMP(6)
OVERRIDDEN_CUTOFF_TIME TIMESTAMP(6)
USER_NOTE NUMBER(32)
但是上面的nnsert查询没有工作在oracle请求中给出异常你请告诉我上面的查询出了什么问题是否有任何参数是错误的,这是与tabe ddl的值有关的内容
答案 0 :(得分:3)
将您尝试与字段列并排插入的字段放在一起。
您会注意到INSERT
语句中有43个值,而表中有47列。这为您提供了可能缺少必填字段的线索。
缺少的字段为TEMP_SI_ID_RBSPARTY
,
TEMP_SI_ID_COUNTERPARTY
,MANUALLY_ACCOUNTED_FLAG
和TOKEN_OWNER
。
在前面提到的四个字段中,只有MANUALLY_ACCOUNTED_FLAG
是强制性的,因为它标记为NOT NULL
。因此,您必须为此字段提供值,以便插入可以正常工作。