Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Returning results from a Stored procedure
Thomas Kyte wrote:
> A copy of this was sent to Pinne <pinne_at_pegit.se>
> (if that email address didn't require changing)
> On Sun, 24 Oct 1999 21:57:05 +0200, you wrote:
>
> >Are these types of statement possible from within an SP:
> >SELECT col1, col2 FROM Table1;
>
> >Is there another way to return result-sets from SP:s
> >
> >/Regards
>
> See the URL in my signature. I have a short article on returning result sets
> from stored procedures (a HOWTO)
>
> --
> See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle Corporation
I tried what You described and it works fine.
However I would like to do it all from within ONE procedure, ie.
declare the cursor type(if the type declaration is neccessary), open it and
print it.
Do i really need to declare the cursor as Package type, return it and THEN
print.it.
I tried to put it all in one but failed (could be a syntax/typo thing, and yes
I'm new on Oracle)
I can accomplish the same thing in an SQL-server SP by simply
CREATE PROCEDURE select_something
SELECT col1, col2 FROM someting
(Don't know what's done explicitly in the background though)
/Cheers
--
Björn-Åke Segrell / Pegit AB
Email:pinne_at_pegit.se
Url:http://www.pegit.se
Phone:+46-(0)8-56030220, Fax:+46-(0)8-56034353
Received on Mon Oct 25 1999 - 16:10:21 CDT