Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: executing a query in a Stored Procedure
Since my initial posting was vague and did not properly address the real
issue I am interested in, I will rephrase my question in more detail.
I am creating a general purpose SQL interpreter in java using JDBC to connect to various databases including Oracle. One problem that I have is that there is a facility in the JDBC API to perform an 'executeQuery' statement on a stored procedure. This facility works fine with SQLServer for example, but when I tried to test it with Oracle, I found that Oracles PL/SQL interface does not permit Stored Procedures to execute a query, and make the resultant table of that query available to the caller.
From the responses I have gotten, and thru examples on the Oracle web site, I think may be able to use a cursor for this purpose. The implementation details are still vague to me, and if anyone can lend some insight, or point to a good reference on this topic, I would appreciate it.
Thanks
-Neal Gran
Metaserver Inc.
check out http://www.mserver.com to see our revolutionary web
application server technology
In article <7krcta$g8j$1_at_nnrp1.deja.com>,
nealgran_at_my-deja.com wrote:
> When I try to perform a query in a stored procedure it does not
compile.
>
> The PL/SQL syntax I used is as follows:
>
> Create Procedure GetInfo AS
> BEGIN
> select Field1 from MyTable;
> END;
>
> Does this have to do with the handling of the resultant table from the
> query? If I replace the query with a directive the Stored procedure
> compiles.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Jun 24 1999 - 10:59:04 CDT