View Single Post

   
  #3 (permalink)  
Old 04-08-2008, 10:04 AM
Vladimir M. Zakharychev
 
Posts: n/a
Default Re: Inserting Milliseconds into table



>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


Doesn't seem like Oracle syntax to me. It's MS SQL Server or am
I drinking too much coffee lately?

Anyway, you need to use TIMESTAMP datatype if you want
milliseconds (available in 9i and later.) And format specifier for
milliseconds is FF[precision], so correct format string would be

TO_TIMESTAMP('....','YYYYMMDD HH24:MI:SS.FF3')

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Reply With Quote