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

Home -> Community -> Usenet -> c.d.o.misc -> Re: help! Updatable cursor

Re: help! Updatable cursor

From: Michael J. Ort <michael_ort_at_my-deja.com>
Date: Fri, 07 Apr 2000 19:12:00 GMT
Message-ID: <8clbtj$9nc$1@nnrp1.deja.com>


If you're using 8.1.5, you can use native dynamic sql to dynamically build a cursor and then pass a REF CURSOR type back to the calling/external procedure that can then loop through the results. This can NOT be done using the DBMS_SQL package. I guess you could alternatively pass back the text of the dynamically created cursor and execute it from the calling proc.

Hope that's what you were looking for...

Michael J. Ort

In article <38e8c50a$0$1386_at_news.choice.net>,   "Dana Jian" <dana_jian_at_hotmail.com> wrote:
> Hi,
>
> I need to have a "writable" cursor generated and processed in a
function and
> then return the cursor back, it's for print report purpose.
>
> Let's see a simple example,
>
> The basic query looks like
> Select emp_name, emp_age, 0 as emp_complex_1, 0 as emp_complex_2, 0 as
> emp_complex_3 ..
> From Employees
> Where ....(the condition is a string passed in)
>
> The columns emp_complex_1, emp_complex_2, emp_complex_3 can only be
obtained
> through some function call, we just create the column with 0 as the
initial
> value in above code.
>
> So I need a function which can handle a dynamic-cursor (because the
where
> condition is passed in from client side), and also can loop through
the
> cursor, fill in (Update) some calculated columns and then return the
cursor.
>
> Could you give me some idea how to do this?
>
> Really appreciate your help!!
>
> Dana
> Dana_jian_at_hotmail.com
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 07 2000 - 14:12:00 CDT

Original text of this message

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