Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Inserting Milliseconds into table
Hi
How do use insert statements to insert millisecs into an oracle table?
CREATE TABLE [dbo].[script] (
[scriptid] numeric(20,0) NOT NULL, [creationdate] datetime NOT NULL,CONSTRAINT [PK_script] PRIMARY KEY([scriptid]) )
I have tried:
INSERT INTO script(scriptid, creationdate)
VALUES(0, to_date('20060321 12:00:01.001','YYYYMMDD HH:mi:ss.ms'))
but get the error
>[Error] Script lines: 1-2 --------------------------
ORA-01821: date format not recognized
and
INSERT INTO script(scriptid, creationdate)
VALUES(0, to_date('20060321 12:00:01.001','YYYYMMDD HH:mi:ss'))
but get the error
>[Error] Script lines: 1-2 --------------------------
ORA-01830: date format picture ends before converting entire input
string
Thanks for the help! Received on Fri Mar 24 2006 - 02:45:59 CST
![]() |
![]() |