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: insane error?

Re: insane error?

From: kev <kevin.porter_at_fast.no>
Date: Tue, 14 Sep 1999 18:04:39 +0100
Message-ID: <37DE8027.16895D65@fast.no>


Jonathan Lewis wrote:

> In theory I think you should be table to do the
> following in 8.0, but on my NT 4/SP3/8.0.5
> system it crashes with ORA-03113.
>
> Please let me know if it works for you
> (NB In 8.1.5 you can do exactly as you
> want, the ORDER BY inside the view
> is valid).
>
> This script runs against the DEMO
> id, using the CUSTOMER table.
>
> create or replace type jpl_row as
> ct(
> id number,
> description varchar2(40)
> );
> /
>
> create or replace type jpl_array as table of jpl_row;
> /
>
> select id, description
> from
> the (
> select
> cast(
> multiset(
> select customer_id, address
> from customer
> order by address
> )
> as jpl_array
> )
> from dual
> )
> where rownum <= 10
> ;
>
> The cast(multiset()) turns the ordered
> select statement into an object table;
> then the 'the select ()' turns the now
> ordered object table back into a
> row set, from which you select
> the first 10.
>

I'll try this as soon as I understand it! ;) What's the 'the' statement do?

>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> kev wrote in message <37DE1BE1.B6381D0F_at_fast.no>...
> >Jonathan Lewis wrote:
> >
> >> Order by in views is not legal in 8.0.5,
> >> so the error arises because a closing
> >> bracket is expected after
> >> > AND category.sect = section.id
> >>
> >
> >Ah, I see. How else should it be done then?
> >It seems to me that I'm only trying to do what many other people must need
> >to do also. Surely there is a way this can be done satisfactorily?
Received on Tue Sep 14 1999 - 12:04:39 CDT

Original text of this message

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