Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase vs Oracle - which is better?
>
>
> As a cursor declare ...
> CREATE OR REPLACE proc (p_i IN INTEGER) AS
> CURSOR c1 is SELECT ...... FROM A,B,C WHERE A.i = p_i;
> BEGIN
> FOR w1 in C1 LOOP
> if valid(w1) then
> PROCESS (w1);
> end if;
> END LOOP;
> END proc;
>
> Simple ... like that (valid returns boolean if the row is to be processed
> and returns the cursor record values too which might have been modified by
> the valid function). No need to store the temporary result. Oracle takes
> care of that for me. This really shows to me, as an non Sybase programmer,
> the difference in "religion" and approach. To me, thinking of temporary
> tables still "smells like" thinking of files. And THAT is a relational
> database misconception I've seen in many Oracle programmers ... resulting in
> many program problems and strange designs.
I belive once you step down that cursor it's toast. I would like to have more
that one pass at the table.
I don't see anything that simply returns a result set either? I wonder which is
faster?
Also, if you want to modify a set of data you have to step through each record.
AS opposed to just excuting one update.
Looks gnarly to me.
joe
>
>
Received on Wed Dec 02 1998 - 00:00:00 CST
![]() |
![]() |