Path: news.easynews.com!easynews!nntp.flash.net!newsfeed.mathworks.com!wn3feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail
Message-ID: <3D27E4D2.79B97D74@ureach.com>
From: Karen <abvk@ureach.com>
X-Mailer: Mozilla 4.72 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.server
Subject: Re: SELECT in "EXECUTE IMMEDIATE" returning nothing
References: <c9bc36ff.0207052015.2235e79c@posting.google.com> <3D26D099.7000507@OracleCare.Com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 11
NNTP-Posting-Host: 12.234.110.174
X-Complaints-To: abuse@attbi.com
X-Trace: sccrnsc03 1026024713 12.234.110.174 (Sun, 07 Jul 2002 06:51:53 GMT)
NNTP-Posting-Date: Sun, 07 Jul 2002 06:51:53 GMT
Organization: AT&T Broadband
Date: Sun, 07 Jul 2002 06:51:53 GMT
Xref: easynews comp.databases.oracle.server:153297
X-Received-Date: Sat, 06 Jul 2002 23:50:31 MST (news.easynews.com)

> Your approch is very expensive, hard parsing of v_SQLString
> for every loop. Statement (cursor) reuse might be posible by
> creating the sql_string like select count(*) from :tab where...
> and EXECUTE IMMEDIATE v_SQLString INTO v_Result using <'table_name'>
> Try it, it might work.

No it will not.  You cannot use bind variables to pass table names. Bind phase
follows the parse phase, when the table names are needed.

Unless there are changes in oracle 9 which I missed out.

