Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Cannot use Order By with XMLAGG()

Re: Cannot use Order By with XMLAGG()

From: Jake Johnson <jake_at_plutoid.com>
Date: Mon, 06 Oct 2003 09:59:24 -0800
Message-ID: <F001.005D22CE.20031006095924@fatcity.com>


I found the issue. I was only running 9.2.0.1 and it successfully worked on 9.2.0.3. I know this will help someone in the future. Good luck!

On Mon, Oct 06, 2003 at 08:49:30AM -0800, Jake Johnson wrote:
> No, the correct field is atrb_srt_ord. I also tried order by 1 and that didn't work either. The field names are in the describe below.
>
> Thanks
> Jake
>
>
> On Fri, Oct 03, 2003 at 01:29:33PM -0800, Dave Hau wrote:
> > Is it because you misspelled "atrb_srt_ord" as "atrb_str_ord" in the
> > ORDER BY clause?
> >
> > HTH,
> >
> > Dave
> >
> >
> >
> >
> >
> > jake_at_plutoid.com wrote:
> > >Hello,
> > >I cannot use order by in with my xmlagg clause. Any ideas???
> > >
> > >Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 -
> > >Production
> > >With the OLAP and Oracle Data Mining options
> > >JServer Release 9.2.0.1.0 - Production
> > >
> > >
> > >SELECT XMLELEMENT("Department",
> > > XMLAGG(
> > > XMLELEMENT("Employee", e.atrb_cd||' '||e.vw_cd)
> > > ORDER BY atrb_str_ord --this works if I -- it out
> > > ))
> > > as "Dept_list"
> > >FROM dim_vw_atrb e;
> > >
> > >QL> desc dim_vw_atrb;
> > > Name Null? Type
> > > ----------------------------------------- --------
> > > ----------------------------
> > > CLNT_CD NOT NULL NUMBER(2)
> > > DIM_CD NOT NULL NUMBER(2)
> > > VW_CD NOT NULL NUMBER(2)
> > > ATRB_CD NOT NULL NUMBER(3)
> > > ATRB_SRT_ORD NOT NULL NUMBER(2)
> > > CRE_DT NOT NULL DATE
> > > CRE_IDSID NOT NULL VARCHAR2(8)
> > > LAST_MOD_DT NOT NULL DATE
> > > LAST_MOD_IDSID NOT NULL VARCHAR2(8)
> > >
> > >Thanks,
> > >Jake
> > >
> > >
> >
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Dave Hau
> > INET: davehau123_at_netscape.net
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jake Johnson
> INET: jake_at_plutoid.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jake Johnson
  INET: jake_at_plutoid.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Oct 06 2003 - 12:59:24 CDT

Original text of this message

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