Re: Get ref cursor data dynamically - HOW ????

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Fri, 14 Feb 2003 15:53:26 GMT
Message-ID: <Wh83a.97484$2H6.1439_at_sccrnsc04>


In addition to Brian's observation I strongly recommend you don't dynamically create temporary tables. This is usually an indication of poor programming practice. (read crutch from other databases where it is a necessity) It will lead to piss poor performance and scalability. If you really really really just gotta have them then use global temporary tables (see docs). The use of inline views etc. makes it highly unlikely that you need to create temporary tables on the fly. (see asktom.oracle.com for discussions and other options)
Jim

--
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Brian E Dick" <bdick_at_cox.net> wrote in message
news:2z63a.5366$4F3.321491_at_news2.east.cox.net...

> Cursors don't have to be bound to a %rowtype. They can be totally generic.
> The only requirement is that you have the right number and type of
variables
> when you do the fetch.
>
> "V. Pryadkin" <vpryadkin_at_yahoo.com> wrote in message
> news:33c9717f.0302140243.415b1b72_at_posting.google.com...
> > Guys,
> >
> > I'm in stupor, pleeeeease heeeeelp ! :o)
> >
> > Seriously, here is what's going on. I'ge got a ref cursor which comes
> > to my pl/sql procedure as a parameter. Now I need to create a
> > temporary table with corresponding structure, rake the cursor data out
> > and save the whole bunch of crap in the table. The thing is that such
> > ref cursor can be different at any time, i.e. I have no pre-defined
> > %rowtype to fetch the data into, so I need to prepare it dynamically
> > as soon as the cursor appears. There is no problem with field
> > names/attributes because each time I know what package/procedure the
> > cursor has came from, so I just use all_arguments view. But I've got
> > stuck on a very stupid problem. I can not bind the ref cursor as an
> > "IN" parameter into dbms_sql nor EXECUTE IMMEDIATE. Known issue I
> > guess. Sucks. OK, I tried to find a workaround - there is a nice thing
> > called JDBC with magic word "getMetaData()". Actually I'm not a Java
> > guy, but a simple stored Java procedure is not a rocket science, so I
> > created one. Amazing, there is everything what I need including even
> > weak cursor info, but all the magic words belong to ResultSet; and the
> > only way get that RecordSet is to call sql-statement, which returns
> > ref cursor... What the heck !!! I already DO have ref cursor !!! All I
> > need is just to pass it as a parameter to the damn Java procedure and
> > get access to it's info - ref cursor is just a physical pointer to
> > "select" data in memory. Seems like there is no simple solution, but
> > probably I just don't know something. Any idea is really appreciated !
> >
> > Thanks !
>
>
Received on Fri Feb 14 2003 - 16:53:26 CET

Original text of this message