PLS-00103: Encountered the symbol “FOR” when expecting one of the following:
up vote
1
down vote
favorite
**hello I'm trying to do a FOR loop in oracle but it throws the following error
ORA-06550: line 6, column 1:
PLS-00103: Encountered the symbol "FOR" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol ";" was substituted for "FOR" to continue.**
DECLARE
PROV number;
RAN_PRICE NUMBER;
begin
prov := 1
for loop_one in 1..10
loop
FOR LOOP_two IN 1..5
LOOP
SELECT (1+ABS(MOD(dbms_random.random,1800)))into RAN_PRICE FROM dual;
INSERT INTO marcos.PRODUCTO
VALUES(SEQ_PRODUCTO.nextval, 'Producto_'||PROV,RAN_PRICE,PROV);
END LOOP ;
PROV := PROV+ 1;
end loop ;
commit;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Se ha producido un error') ;
rollback;
end;
oracle plsql oracle11g
add a comment |
up vote
1
down vote
favorite
**hello I'm trying to do a FOR loop in oracle but it throws the following error
ORA-06550: line 6, column 1:
PLS-00103: Encountered the symbol "FOR" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol ";" was substituted for "FOR" to continue.**
DECLARE
PROV number;
RAN_PRICE NUMBER;
begin
prov := 1
for loop_one in 1..10
loop
FOR LOOP_two IN 1..5
LOOP
SELECT (1+ABS(MOD(dbms_random.random,1800)))into RAN_PRICE FROM dual;
INSERT INTO marcos.PRODUCTO
VALUES(SEQ_PRODUCTO.nextval, 'Producto_'||PROV,RAN_PRICE,PROV);
END LOOP ;
PROV := PROV+ 1;
end loop ;
commit;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Se ha producido un error') ;
rollback;
end;
oracle plsql oracle11g
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
**hello I'm trying to do a FOR loop in oracle but it throws the following error
ORA-06550: line 6, column 1:
PLS-00103: Encountered the symbol "FOR" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol ";" was substituted for "FOR" to continue.**
DECLARE
PROV number;
RAN_PRICE NUMBER;
begin
prov := 1
for loop_one in 1..10
loop
FOR LOOP_two IN 1..5
LOOP
SELECT (1+ABS(MOD(dbms_random.random,1800)))into RAN_PRICE FROM dual;
INSERT INTO marcos.PRODUCTO
VALUES(SEQ_PRODUCTO.nextval, 'Producto_'||PROV,RAN_PRICE,PROV);
END LOOP ;
PROV := PROV+ 1;
end loop ;
commit;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Se ha producido un error') ;
rollback;
end;
oracle plsql oracle11g
**hello I'm trying to do a FOR loop in oracle but it throws the following error
ORA-06550: line 6, column 1:
PLS-00103: Encountered the symbol "FOR" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol ";" was substituted for "FOR" to continue.**
DECLARE
PROV number;
RAN_PRICE NUMBER;
begin
prov := 1
for loop_one in 1..10
loop
FOR LOOP_two IN 1..5
LOOP
SELECT (1+ABS(MOD(dbms_random.random,1800)))into RAN_PRICE FROM dual;
INSERT INTO marcos.PRODUCTO
VALUES(SEQ_PRODUCTO.nextval, 'Producto_'||PROV,RAN_PRICE,PROV);
END LOOP ;
PROV := PROV+ 1;
end loop ;
commit;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Se ha producido un error') ;
rollback;
end;
oracle plsql oracle11g
oracle plsql oracle11g
edited Nov 11 at 8:46
a_horse_with_no_name
287k46434529
287k46434529
asked Nov 11 at 6:33
marcos j
152
152
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You are missing a semi-colon (;) at the end of prov's initialization:
prov := 1;
-- Here -^
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You are missing a semi-colon (;) at the end of prov's initialization:
prov := 1;
-- Here -^
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
add a comment |
up vote
0
down vote
accepted
You are missing a semi-colon (;) at the end of prov's initialization:
prov := 1;
-- Here -^
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You are missing a semi-colon (;) at the end of prov's initialization:
prov := 1;
-- Here -^
You are missing a semi-colon (;) at the end of prov's initialization:
prov := 1;
-- Here -^
answered Nov 11 at 6:36
Mureinik
175k21126194
175k21126194
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
add a comment |
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
it was that; thanks and sorry for the stupid question
– marcos j
Nov 11 at 6:55
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246419%2fpls-00103-encountered-the-symbol-for-when-expecting-one-of-the-following%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown