Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: EXEC syntax for SP which returns row set

Re: EXEC syntax for SP which returns row set

From: Mark A <nobody_at_nowhere.com>
Date: Thu, 14 Jul 2005 21:51:26 -0600
Message-ID: <DfydnYp__eEgr0rfRVn-3w@comcast.com>


<fitzjarrell_at_cox.net> wrote in message
news:1121397866.386844.278650_at_g43g2000cwa.googlegroups.com...
>
> This is what YOU posted after a re-write changed the procedure to a
> function:
>
> var results refcursor
> exec :results := TEST.SPTEST
> print results
>
> Show me where THAT matches what I posted above, using a stored
> procedure.
>

Are you serious? It looks pretty close to me. But if you don't think so, let's just drop it.

> You may not believe any of us, since you're so lost in your world of
> DB2, however all who posted to your initial query attempted to guide
> you to the proper answer, even Oracle itself. And, no, you weren't the
> first to post the answer; Maxim Demenko was the first to flesh out the
> responses and lead you by the nose to the correct solution, albeit with
> PL/SQL instead of SQL*Plus.
> <snip>

Albeit? I specifically said in my OP that I need to know how to do it with SQL*Plus.

I was testing the SP in SQL*Plus not PL/SQL. The SP will be called by a java program (the java programmer knows how to call it with a result set) but I just needed to run a quick test in SQL*Plus.

I asked 3 experienced Oracle DBA's about this, all of whom said they knew PL/SQL, but none knew the answer. None referred me to the SQL*Plus manual, but recommended some PL/SQL manuals and books they gave me to look at.

The link I found and posted in this thread previously (repeated below) led me to the correct answer. However I do thank Maxim for his response and his high level of courtesy and professionalism.

Here is where I got the answer that I posted previously, and it works perfectly:

Returning a JDBC result set from an Oracle stored procedure, by Bruce P. Blackshaw
http://www.enterprisedt.com/publications/oracle/result_set.html Received on Thu Jul 14 2005 - 22:51:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US