Re: how to set seconds-precision for systimestamp

From: <johnbhurley_at_sbcglobal.net>
Date: Sun, 19 Apr 2009 16:12:57 -0700 (PDT)
Message-ID: <05885a86-c2ab-44c5-a819-9ccb0422acf5_at_k38g2000yqh.googlegroups.com>



On Apr 19, 6:39 pm, Ken Quirici <kquir..._at_yahoo.com> wrote:
> On Oracle 10g (10.2) installed on my home PC with vista premium:
>
> I tried the following to have systimestamp return 9 digits of
> precision - it returns
> 9, but the last 6 are all always 0. How can I see those missing 6
> digits of precision?
> Thanks for any help.
>
> ken
>
> set serveroutput on size 1000000
>
> declare
>         currtimestamp   timestamp (9);
>         seconds         number(9);
>
> begin
>         currtimestamp := systimestamp;
>         dbms_output.put_line(to_char(currtimestamp,'ff9'));
>
> end;
> /

I dunno about 9 digits I thought systimestamp gave 6 digits of precision past second ... here is something I use TO_CHAR (SYSTIMESTAMP, 'YYYYMMDDHH24MISSFF'). Wonder if there are platform dependencies? Maybe try my to_char specification and if that works keep digging.

Hmmm when I try your ff9 thing I still get 6 digits of precision plus 3 zeros ( linux 64 bit OEL 5.1 oracle 11.1.0.7 64 bit ).

Shot in the dark is that perhaps platform by platform there are limits on the precision that systimestamp can get from the operating system.

Of course ... one could always look it up in the oracle documentation ... Received on Sun Apr 19 2009 - 18:12:57 CDT

Original text of this message