Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

While Loop Error

187babb6-aec4-4bc2-900f-d731a81d9d8cAug 6 2014 — edited Aug 6 2014

I'm learning Oracle

but I have a problem withn this exercise,  I need to this summation

3

∑  (X2 + 4)

N=1


and this is my code


DECLARE

x NUMBER(10) :=0;

z NUMBER;

suma NUMBER;

BEGIN

WHILE x<=3

LOOP

x :=x+1;

z := x*2+4;

suma := suma+z;

END LOOP;

DBMS_OUTPUT.PUT_LINE(suma);

END


what is my error ?



Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2014
Added on Aug 6 2014
3 comments
156 views