Topic: Oracle Certified Professional Exams (OCP & OCA) >> Loops
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| chinna |
Posted: Nov 14, 2007 11:54:32 PM |
Total Post: 26
Joined: May, 2007
|
SELECT * FROM OPTIONDEM0
OPTION1 OPTION2 OPTION3 OPTION4 OPTION5
-------------------------------------------------------------------------------------------------------------------------------------------------
EDGFDG EKLJLKJ EQWR EDFGFDG ELKJKJL
DTYUYTU DFGHGHJ DASFG DKJHKJK DKJHKJK
CUYYUI CVCDD CAWSQ CUIOKJ CAQWERTY
BJHGJGHJ BRTYUY BKLIUUI BASDF BRFES
ATRYTRY ATYTRYRT AGHHJJ AJGFJGH AHJHGJJH
--------------------------------------------
anynomous block to retreive each field value from table
-------------------------------------------
DECLARE
VAR1 VARCHAR2(30);
BEGIN
FOR I IN (SELECT * FROM OPTIONDEM0)
LOOP
VAR1:=I.OPTION;
FOR J IN 1..5
LOOP
IF VAR1||J IS NOT NULL THEN
VAR1:=TO_CHAR(I.OPTION||J);
DBMS_OUTPUT.PUT_LINE(VAR1);
END IF;
END LOOP;
END LOOP;
END;
---------
when i execute this block
following error message is displaying
Error report:
ORA-06550: line 6, column 9:
PLS-00103: Encountered the symbol "OPTION" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier> delete
exists prior <a single-quoted SQL string>
The symbol "<an identifier> was inserted before "OPTION" to continue.
ORA-06550: line 10, column 21:
PLS-00103: Encountered the symbol "OPTION" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier> delete
exists prior <a single-quoted SQL string>
The symbol "<an identifier> was inserted before
|
|
|
positive |
| Posted: Jun 29, 2008 02:19:54 PM | |
|
Total Post: 361
Joined: Jun, 2008
|
OPTION is a PL/SQL keyword.
http://neworacledba.blogspot.com/
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 814 |
| Mohammed Taj | 694 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| positive fanatic | 361 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 239 |
| neeraj sharma | 228 |
| Ramesh Jois | 226 |
| snehalatha p | 169 |
|
|