Re: Materialized View
From: ExecMan <artmerar_at_yahoo.com>
Date: Wed, 16 May 2012 19:11:50 -0700 (PDT)
Message-ID: <4b07c038-5b58-4978-bab2-dc12815eac09_at_o3g2000pby.googlegroups.com>
On May 16, 3:28 pm, ddf <orat..._at_msn.com> wrote:
> On May 16, 10:44 am, ExecMan <artme..._at_yahoo.com> wrote:
>
> > Hi,
>
> > Can a materialized view be created based on an object table like
> > this. I have a PL/SQL procedure which creates this object table and
> > populates it, then I want to create a materialized view from it:
>
> > EXECUTE IMMEDIATE 'CREATE MATERIALIZED VIEW inst_holdings_mv AS
> > SELECT * FROM TABLE(CAST(v_inst_hold_rec AS
> > inst_holdings_table))';
>
> > I get an error:
>
> > ERROR at line 1:
> > ORA-00904: "V_INST_HOLD_REC": invalid identifier
> > ORA-06512: at line 44
>
> v_inst_hold_rec is out of scope for the execute immediate command.
>
> David Fitzjarrell
Date: Wed, 16 May 2012 19:11:50 -0700 (PDT)
Message-ID: <4b07c038-5b58-4978-bab2-dc12815eac09_at_o3g2000pby.googlegroups.com>
On May 16, 3:28 pm, ddf <orat..._at_msn.com> wrote:
> On May 16, 10:44 am, ExecMan <artme..._at_yahoo.com> wrote:
>
> > Hi,
>
> > Can a materialized view be created based on an object table like
> > this. I have a PL/SQL procedure which creates this object table and
> > populates it, then I want to create a materialized view from it:
>
> > EXECUTE IMMEDIATE 'CREATE MATERIALIZED VIEW inst_holdings_mv AS
> > SELECT * FROM TABLE(CAST(v_inst_hold_rec AS
> > inst_holdings_table))';
>
> > I get an error:
>
> > ERROR at line 1:
> > ORA-00904: "V_INST_HOLD_REC": invalid identifier
> > ORA-06512: at line 44
>
> v_inst_hold_rec is out of scope for the execute immediate command.
>
> David Fitzjarrell
David,
Not sure what you mean by "out of scope". Is my syntax wrong? Received on Wed May 16 2012 - 21:11:50 CDT