Literal does not match format string in Oracle
Hello I am trying to run this oracle query in toad and I am getting the above mentioned error. How can I fix it?
INSERT
INTO IMAGE
(
IMAGE_SEQ_NO,BLDG_ID,BU_ID,DT_TAKEN,
NEGATIVE_NO,FILENAME,FILE_TYPE,DESCRIPTION,
STORAGE_SRCE,DOC_ID,PICT_SRCE_TYPE,TAKE_BY,
INFO_SRCE,DOC_REF_NO,DOC_TYPE,SUB_DOC_TYPE,
DDW_IMAGE_DOC_STATUS,SUB_IMAGE_DOC_STTS_DT,CPVI,FY,
CY,HPD_PRIVACY_FLG,EXT_PRIVACY_FLG,SCAN_DEVICE,
ADD_BY,ADD_DT,CHG_BY,CHG_DT,
REC_STTS,REC_STTS_REASON,REC_STTS_DT
)
VALUES
(
1087986,43633,78,'30/June/2010 12:15开发者_如何学编程:15 PM',
NULL,NULL,0,NULL,
0,2065041,0,0,0,
NULL,1,204,0,
'30/June/2010 12:15:15 PM','1',0,0,
NULL,NULL,NULL,'JKF',
'30/June/2010 12:15:15 PM','JKF','30/June/2010 12:15:15 PM',1,
NULL,'30/June/2010 12:15:15 PM'
);
In general it is a good idea to use a specific format when inserting dates into Oracle, using the TO_DATE function: See http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions183.htm
If you want to use a standard format for everything, use NLS_DATE_FORMAT:
alter session set NLS_DATE_FORMAT='DD-MM-YYYY'
Probably the date format does not match the setting for your connection.
精彩评论