Home » SQL & PL/SQL » SQL & PL/SQL » Ref cursor
icon2.gif  Ref cursor [message #247796] Wed, 27 June 2007 04:40 Go to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Hi,

Is there any way to find out, that..how many colmns will be returned by the Ref Cursor and what will be the DataType / Column Names of those columns which will be returned as resultset?
Re: Ref cursor [message #247801 is a reply to message #247796] Wed, 27 June 2007 04:48 Go to previous messageGo to next message
iamdurai
Messages: 96
Registered: April 2007
Location: Chennai
Member

Hi,

This Question was asked lot of times click this Ref Cursor

Reds
Thangam
Re: Ref cursor [message #247802 is a reply to message #247796] Wed, 27 June 2007 04:49 Go to previous messageGo to next message
caliguardo
Messages: 107
Registered: February 2007
Location: Chennai
Senior Member

better you can try it here

www.google.com


Re: Ref cursor [message #247803 is a reply to message #247796] Wed, 27 June 2007 04:57 Go to previous messageGo to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member


hi all,


please be send the answer...Dont mention the Link like to see that place or that place for getting the answer.. But here my question is it possible to get how many columns will be returned by ref cursor... I found many sites..but all sites to mention the explanation of ref cursor only..still I am not getting the proper answer..Please help me to solve that problem
Re: Ref cursor [message #247815 is a reply to message #247803] Wed, 27 June 2007 05:15 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
balaji23_d wrote on Wed, 27 June 2007 11:57
please be send the answer
Send? We post answers here. We don't do home deliveries.
balaji23_d wrote on Wed, 27 June 2007 11:57
Dont mention the Link like to see that place or that place for getting the answer.
Don't tell me what to answer to a question. Be polite. Take some initiative yourself. Look around. But you are not in a position to make demands.

balaji23_d wrote on Wed, 27 June 2007 11:57
But here my question is it possible to get how many columns will be returned by ref cursor
No. You cannot know in advance how many records you will retrieve.

MHE
Re: Ref cursor [message #247820 is a reply to message #247796] Wed, 27 June 2007 05:23 Go to previous messageGo to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Be cool Maher, I was in work tension..

This want i want..




Actually, What I mean to say and What I want to do is that:

I will just give an argument of "procedure_name" to the procedure which will do some dynamic work on given argument and will return a result like that.

Procedure Name : Employee_Proc
Ref-Coursor Found : Yes
Ref-Cursor Name : Resultset
Ref-Cursor Columns : 3
Ref-Cursor OutPut :
COULMN TYPE
-------- -------------
Emp_Code NUMBER
Emp_Name VARCHAR2(100)
HireDate Date


Please reply with Code Example.

I shall be very thankful to you.
Re: Ref cursor [message #247826 is a reply to message #247820] Wed, 27 June 2007 05:45 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Oh, but I am cool. Don't worry.

On topic: I can't make anything of this, sorry. I really can't. So far I understood:
1. You have a procedure with a parameter.
2. That procedure "will do some dynamic work on given argument". This is where I'm lost. What do you want this procedure to do?
3. The procedure has an out parameter, because it has to return something. Perhaps you're relying on DBMS_OUTPUT? Or are you looking for a function instead? I can't tell.

I can't help you with the information you gave. Sad

MHE
Re: Ref cursor [message #247853 is a reply to message #247796] Wed, 27 June 2007 06:45 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for print_table on AskTom you will get how to do this.

Regards
Michel
Re: Ref cursor [message #247854 is a reply to message #247796] Wed, 27 June 2007 06:47 Go to previous messageGo to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
mahe thank u for ur reply,

As per our problem discussion, I want to describe the ref cursor..based on that problem, what are all the ways we have to solve?

what is strongly typed ref cursor?
what is weakly typed ref cursor?

Are the procedures returning a strongly typed ref cursor? Or a weakly typed ref cursor?

Give me the example of weakly typed ref cursor and strongly typed?
Re: Ref cursor [message #247860 is a reply to message #247854] Wed, 27 June 2007 06:58 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe a search in the documentation will give you the answer.

Regards
Michel
Previous Topic: Multiple Database. How to access other Database table?
Next Topic: Error : ORA-01756: quoted string not properly terminated , when v insert
Goto Forum:
  


Current Time: Sat Dec 03 22:18:36 CST 2016

Total time taken to generate the page: 0.11923 seconds