ORA-01873: the leading precision of the interval is too small [message #399628] |
Thu, 23 April 2009 03:23 |
k_mitra100
Messages: 28 Registered: October 2007 Location: Kolkata
|
Junior Member |
|
|
Hi All,
I am encountering this error in a pl/sql procedure.
The procedure is used to update some business related variable values. The procedure is calcualting the total time taken for this update.
At one place the curent timestamp is stored in a variable and after the update the current timestamp is stored in another variable. Both the variables are of type 'systimestamp'. The result of this expression is stored in a variable whose type is given as:
'INTERVAL DAY (0) TO SECOND (6)'.
The error is occurring randomly. Can anyone help me in this regards?
Thanks in advance,
Kaushik
|
|
|
|
|
Re: ORA-01873: the leading precision of the interval is too small [message #399633 is a reply to message #399632] |
Thu, 23 April 2009 03:59 |
|
Michel Cadot
Messages: 68641 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
SQL> declare
2 t1 timestamp := systimestamp;
3 t2 timestamp := systimestamp + interval '86399' second;
4 d INTERVAL DAY (0) TO SECOND (6);
5 begin
6 d := t2 - t1;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> declare
2 t1 timestamp := systimestamp;
3 t2 timestamp := systimestamp + interval '86400' second;
4 d INTERVAL DAY (0) TO SECOND (6);
5 begin
6 d := t2 - t1;
7 end;
8 /
declare
*
ERROR at line 1:
ORA-01873: the leading precision of the interval is too small
ORA-06512: at line 6
Regards
Michel
|
|
|