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: SQL*Plus and PL/SQL >> Procedure for CLOB to display

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: Procedure for CLOB to display
 focusora  Posted: Jun 18, 2008 02:08:01 AM

 Total Post: 18
 Joined: May, 2008






 -- Need guide to create Stored Procedure for CLOB datatype
My table name XYZ having two columns
col1 as number
col2 as CLOB

select * from XYZ ;
col1 col2
-- ---
1 aasddsf
2 basdfsdf
3 cafdasd
4 dadfsd
5 eafasd

if i pass col1 as input,then
i must get display for col2

sql>exec col1(3) ;

col2
----
cafdasd

 focusora
Posted: Jun 20, 2008 09:38:46 AM  

 Total Post: 18
 Joined: May, 2008






 
Hi all., i got the code for CLOB to execute for pl/sql
code:

SQL> create or replace package clob_proc as
2 type cursorType is ref cursor;
3 procedure return_clob(p_cursor in out cursorType,p_col1 number)
4 ;
5 end;
6 /

Package created.

SQL> create or replace package body clob_proc as
2 procedure return_clob(p_cursor in out cursorType,p_col1 number)
3 is
4 begin
5 open p_cursor for
6 select col1,col2,col3 from tablename where col3 = p_col1;
7 end;
8 end;
9 /

Package body created.

SQL> var c refcursor;
SQL> exec clob_proc.return_clob(:c,93);

PL/SQL procedure successfully completed.

SQL> print c

 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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi335
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






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