Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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.



  


 Title: Loops
 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

  




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 Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software