I am trying to insert data from Netezza to Oracle.Here are my inserts as below.But they don’t work and throw me the above error.
INSERT INTO AM_CTL_DDS_LOAD values('ALB',1002,'2012/02/12');
INSERT INTO AM_CTL_DDS_LOAD values('ALB',1002,'2012/02/09');
INSERT INTO AM_CTL_DDS_LOAD values('ALB',1002,'2012/02/21');
INSERT INTO AM_CTL_DDS_LOAD values('ALB',1002,'2012/02/23');
My table structure is as below.
CREATE TABLE AM_CTL_DDS_LOAD
(
MAS_DIV_CD VARCHAR(5),
LD_SEQ_NBR INTEGER NOT NULL,
TUNING_DT DATE NOT NULL
);
The
ORA-01861: literal does not match format stringerror implies that the third column of theAM_CTL_DDS_LOADtable is defined as aDATE, not aVARCHAR2, and that the implicit conversion of the string to a date is failing because your session’sNLS_DATE_FORMATisn’t ‘YYYY/MM/DD’. The best way to solve the problem is to explicitly insert aDATErather than aVARCHAR2by explicitly callingTO_DATEwith an appropriate format mask.