Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Script now longer stops in 9i

Re: Script now longer stops in 9i

From: Jan Gelbrich <j_gelbrich_at_westfalen-blatt.de>
Date: Wed, 28 Jan 2004 13:44:43 +0100
Message-ID: <bv8b1e$pg02s$1@ID-152732.news.uni-berlin.de>


"timberland_11" <timberland_11_at_yahoo.com> schrieb im Newsbeitrag news:18019e70.0401220443.56ac3130_at_posting.google.com...
> I have been running the following script in oracle 7.3 and its was
> working fine now we have moved to Oracle 9i the scripts never seems to
> end (have to kill the process) is it something to do with how 9i
> treats null values. HELP
>
> DECLARE
> cursor BedCur(ADate DATE) Is
> select a,b, sum(c)
> from X
> where
> (( trunc(a.date_out) <= ADATE
> AND trunc(a.date_out) >= ADATE)
> OR (trunc(a.date_in) <= ADATE
> AND trunc(a.date_in) >= ADATE)
> or (trunc(a.date_in) < ADATE
> and trunc(a.date_out) > ADATE)
> OR (trunc(a.date_in) <= ADATE
> AND trunc(a.date_out) is null))
> GROUP BY a,b,c
> CurDate Date;
> processed_rows NUMBER(12) := 0;
> total_processed_rows NUMBER(12) := 0;
> rows_updated NUMBER(12) := 0;
> BEGIN
> CurDate:='&DateFrom';
> while CurDate<='&DateTo' Loop for Row IN BedCur(CurDate) Loop
> Insert Into XC (site,bedday,Qty)
> Values(CurDate,Row.a,Row.b,Row.c);
> end loop;

--missing:
END;
/

(EOF) You only ended the loop. Received on Wed Jan 28 2004 - 06:44:43 CST

Original text of this message

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