srikotesh
asked on
unable to insert record into a table
Hi Experts,
CREATE TABLE BATCH_JOB_PARAMS (
JOB_INSTANCE_ID BIGINT NOT NULL ,
TYPE_CD VARCHAR(6) NOT NULL ,
KEY_NAME VARCHAR(100) NOT NULL ,
STRING_VAL VARCHAR(250) ,
DATE_VAL TIMESTAMP DEFAULT 0,
LONG_VAL BIGINT ,
DOUBLE_VAL DOUBLE PRECISION ,
constraint JOB_INST_PARAMS_FK foreign key (JOB_INSTANCE_ID)
references BATCH_JOB_INSTANCE(JOB_INS TANCE_ID)
) ;
This is the table i have created
When i am trying to add data to this table i am getting the below error
Data truncation: Incorrect datetime value: '1970-01-01 05:30:00' for column 'DATE_VAL' at row 1;
Thanks,
CREATE TABLE BATCH_JOB_PARAMS (
JOB_INSTANCE_ID BIGINT NOT NULL ,
TYPE_CD VARCHAR(6) NOT NULL ,
KEY_NAME VARCHAR(100) NOT NULL ,
STRING_VAL VARCHAR(250) ,
DATE_VAL TIMESTAMP DEFAULT 0,
LONG_VAL BIGINT ,
DOUBLE_VAL DOUBLE PRECISION ,
constraint JOB_INST_PARAMS_FK foreign key (JOB_INSTANCE_ID)
references BATCH_JOB_INSTANCE(JOB_INS
) ;
This is the table i have created
When i am trying to add data to this table i am getting the below error
Data truncation: Incorrect datetime value: '1970-01-01 05:30:00' for column 'DATE_VAL' at row 1;
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://msdn.microsoft.com/en-us/library/ms182776(v=SQL.90).aspx
in mysql, the timestamp should accept that value:
Open in new window
please confirm you are using mysql and not mssql