Re: how to set seconds-precision for systimestamp

From: Ed Prochak <edprochak_at_gmail.com>
Date: Sun, 19 Apr 2009 16:12:34 -0700 (PDT)
Message-ID: <6f4c3e64-9d77-4b80-b228-af5fbd0b66e3_at_x5g2000yqk.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;
> /

what do you get from changing the output to this line:

   DBMS_OUTPUT.PUT_LINE( TO_CHAR(currtimestamp)); ?

I suggest you check out the documentation. This page may help. http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/datatypes.htm#sthref797

Ed Received on Sun Apr 19 2009 - 18:12:34 CDT

Original text of this message