Re: Problem with collections, casting and ORA 904

From: Andrew Hardy <nobody_at_spam.from.news.AdvanticaTech.com>
Date: Fri, 5 Oct 2001 14:21:38 +0100
Message-ID: <9pkc6c$pf9$1_at_sun-cc204.lut.ac.uk>


Oops... thanks for the opener!

Andy

"Thomas Kyte" <tkyte_at_us.oracle.com> wrote in message news:9phgnb024o6_at_drn.newsguy.com...
> In article <9pfmfl$733$1_at_sun-cc204.lut.ac.uk>, "Andrew says...
> >
> >I have the following types defined:
> >
> >TYPE t_stfr_rec AS OBJECT
> > (
> > stfa_id NUMBER
> > ,datestamp DATE
> > ,withdrawal_qty NUMBER
> > ,injection_qty NUMBER
> > ,period_start DATE
> > ,period_end DATE
> > );
> >
> >TYPE t_stfr_table AS TABLE OF t_stfr_rec;
> >
> >and a function defined as:
> >
> >FUNCTION get_stfr
> >RETURN t_stfr_table;
> >
> >I thought that I would be able to access this type using
> >
> >SELECT * FROM table(get_stfr AS t_stfr_table))
> >
>
> missing CAST:
>
> ops$tkyte_at_ORA8I.WORLD> select *
> 2 from TABLE( cast( my_func as myTableType ) )
> 3 /
>
>
>
> >but I get an ORA 904 referring to get_stfr.
> >
> >What am I doing wrong?
> >
> >Andy
> >--
> >Opinions are mine and do not necessarily reflect those of Advantica
> >Technologies Ltd
> >
> >
>
> --
> Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
Received on Fri Oct 05 2001 - 15:21:38 CEST

Original text of this message