1. fetch yang pertama apakah sama dengan fetch yang kedua.?
jwb : fetch yg pertama hasilnya tidak sama dengan fetch yg kedua.
         fetch pertama hanya akan mengambil data yg pertama dari cursor
DeliverablesCursor sedangkan
         fetch kedua akan mengambil data dari awal sampe akhir dari sursor
tersebut.
         jika loop yg pertama dieksekusi secara sendirian maka akan
terjadi infinite
loop
             open DeliverablesCursor;
             fetch DeliverablesCursor into DeliverablesRow;
             loop
               exit when DeliverablesCursor%notfound;
               blablablablablba....
             end loop;
             close DeliverablesCursor;
         seharusnya :
               OPEN DeliverablesCursor;
               LOOP
                   FETCH DeliverablesCursor into DeliverablesRow;
                   EXIT WHEN c1%NOTFOUND;
                   blablablablablba....
              END LOOP;
              CLOSE DeliverablesCursor;

3. Yup benar bgt, penggunaanya sama saja tergantung kebutuhan.



On 5/2/07, Rino Herumurti <[EMAIL PROTECTED]> wrote:
>
>   Dear All
> saya newbie di oracle. mohon bantuan dari teman2 semua. yang saya tanyakan
> adalah tentang fetch n cursor.
> dibawah adalah scriplet
> open DeliverablesCursor;
>
> fetch DeliverablesCursor into DeliverablesRow;
>
> loop
>
> exit when DeliverablesCursor%notfound;
>
> blablablablablba....
>
> while not DeliverablesCursor%notfound loop
>
> blablablabla....
>
> fetch DeliverablesCursor into DeliverablesRow;
>
> end loop;
>
> end loop;
>
> close DeliverablesCursor;
>
> yang saya tanyakan
>
> 1. fetch yang pertama apakah sama dengan fetch yang kedua.?
>
> 2. apakah dia membentuk 2 fetch.?
>
> 3. apa bedanya loop menggunakan exit when dan loop menggunakan while not?
>
> Terima Kasih... HIDUP ORACLE..!!! MERDEKA!!!!
>
> ----- Original Message -----
> From: Samuel Dwi Cahya
> To: [email protected] <indo-oracle%40yahoogroups.com>
> Sent: Wednesday, May 02, 2007 8:30 AM
> Subject: [indo-oracle] tanya group by vs distinct
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
Regards,

Edi Yanto
PT. Jati Piranti Solusindo (Jatis Solutions)
Menara Jamsostek, Tower A, 16th floor
Jl. Jend. Gatot Subroto Kav.# 38
Jakarta Selatan, 12930 - Indonesia
my blog: http://ediyanto83.wordpress.com


[Non-text portions of this message have been removed]

Kirim email ke