Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Inserting Milliseconds into table

Inserting Milliseconds into table

From: <paulspratley_at_yahoo.co.uk>
Date: 24 Mar 2006 00:45:59 -0800
Message-ID: <1143189959.613222.105960@g10g2000cwb.googlegroups.com>


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]) )
GO

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US