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 -> Re: Bug when dividing an INTERVAL

Re: Bug when dividing an INTERVAL

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 13 Jun 2006 09:02:45 -0400
Message-ID: <kvmdnYgrZYzlKhPZnZ2dnUVZ_q2dnZ2d@comcast.com>

"Björn Wächter" <bwc_at_p3-solutions.de> wrote in message news:4f7huuF1h44n9U1_at_news.dfncis.de...
: When I create this Procedure in my Oracle
: 10.1.0.4 Database and execute it I see the
: strange effect that v_count is changing from
: 1 to NULL. It only happens when dividing
: the Interval by 1.
: Is this Bug known?
: Do you get the same result?
: Is the effect the same in 10.2?
:
:
: CREATE OR REPLACE PROCEDURE Sp_Bug_Test
: AS
:
: v_count NUMBER;
: v_view_periode INTERVAL DAY(9) TO SECOND(6);
: v_base_span INTERVAL DAY(9) TO SECOND(6);
: BEGIN
: v_count := 1;
: dbms_output.put_line('v_count: ' || v_count);
:
: v_base_span := v_view_periode / 1;
: dbms_output.put_line('v_count: ' || v_count);
:
: END Sp_Bug_Test;
:
:
: Björn

no problems here:

SQL> ed
Wrote file afiedt.buf

  1 CREATE OR REPLACE PROCEDURE Sp_Bug_Test   2 AS

  3  v_count                 NUMBER;
  4  v_view_periode          INTERVAL DAY(9) TO SECOND(6);
  5  v_base_span             INTERVAL DAY(9) TO SECOND(6);
  6  BEGIN
  7     v_count   := 1;
  8     dbms_output.put_line('v_count: ' || v_count);
  9     v_base_span := v_view_periode / 1;
 10     dbms_output.put_line('v_count: ' || v_count);
 11* END Sp_Bug_Test;
SQL> / Procedure created.

SQL> set serveroutput on
SQL> exec sp_bug_test
v_count: 1
v_count: 1

PL/SQL procedure successfully completed.

SQL> select * from v$version
  2 /

BANNER



Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production

or here:

Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production
CORE 9.2.0.7.0 Production
TNS for HPUX: Version 9.2.0.7.0 - Production NLSRTL Version 9.2.0.7.0 - Production Received on Tue Jun 13 2006 - 08:02:45 CDT

Original text of this message

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