python - IntegrityError: ORA-01400: cannot insert NULL into -
i'm trying parse following parameters cursor.execute
:
sql_insert = 'insert sms_messaging (result_sms, msgid, msgparts) values (:1, :2, :3)' smsreport_text_new = ('success', '2d67c865fb6fa25a9261c75e8d2f0f2b ', 1) cursor.execute(sql_insert, smsreport_text_new)
afterwards i'm receiving following error message:
integrityerror: ora-01400: cannot insert null ("adauth"."sms_messaging"."date_sms")
in order build table, .sql
file looks this:
-- create template create table sms_messaging( date_sms date primary key, result_sms varchar(20), msgid varchar(128), msgparts integer, errorcode integer, errormessage varchar(128) );
even though particular sql_insert
there no date_sms
, error message indicates issue this. don't see i'm going wrong. how can resolve issue?
the problem have column date_sms
declared not null
, has no default value. need give value. don't know should be, perhaps this:
insert sms_messaging (result_sms, msgid, msgparts, date_sms) values (:1, :2, :3, sysdate);
this put current date/time field.
Comments
Post a Comment