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: Materialized view dynamic row count

Re: Materialized view dynamic row count

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 12 Oct 2005 07:06:20 +0200
Message-ID: <fd6pk1p6vd1jh9gcvaa0ahh13bcnvbh2qb@4ax.com>


On Wed, 12 Oct 2005 10:27:17 +1000, Geoff Muldoon <geoff.muldoon_at_trap.gmail.com> wrote:

>connor_mcdon..._at_yahoo.com says...
>
>> execute immediate 'select count(*) from '||c.view_name
>> into l_count;
>
>D'oh me. Thanks Connor.
>
>I am in the habit whenever using execute immediate of declaring a varchar2
>named v_sql, populating the string and then calling it. Had tried:
>
>v_sql := 'select count(*) from '||c.view_name||' into '||l_count;
>execute immediate v_sql;
>
>and this was failing.
>
>Geoff M

The correct syntax is, IIRC, execute immediate into variable.

--
Sybrand Bakker, Senior Oracle DBA
Received on Wed Oct 12 2005 - 00:06:20 CDT

Original text of this message

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