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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Complex PL-SQL Query ?

Re: Complex PL-SQL Query ?

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 21 Nov 2002 10:23:38 -0800
Message-ID: <130ba93a.0211211023.2144938f@posting.google.com>


Right, that was a typo of a sort. Should be

group by HULLTYPE

Though the SQL posted by Gomer McFlarp looks simpler. Have not compared the plan and performance, but I would use his query.

"Damjan S. Vujnovic" <damjan_at_galeb.etf.bg.ac.yu> wrote in message news:<aria5u$8el$1_at_news.etf.bg.ac.yu>...

> "Jusung Yang" <JusungYang_at_yahoo.com> wrote:

> > > YDT 5 443322/B 01-JAN-99
> > > YTD 5 443322/B 28-NOV-02
> >
> > Should the first be 'YTD'? If yes, you can do something like this:
> >
> > select * from <table> t1 where exists ( select * from
> > (select HULLTYPE, max(ASOFDATE) d1 from <table> group by ASOFDATE)
>  t2

> > where t1.HULLTYPE=t2.HULLTYPE and t1.ASOFDATE=t2.d1);
> > [group by ASOFDATE] or maybe [group by HULLTYPE]? > > Regards, > Damjan S. Vujnovic > > University of Belgrade > School of Electrical Engineering > Department of Computer Engineering & Informatics > Belgrade, Yugoslavia

>
> http://galeb.etf.bg.ac.yu/~damjan/ Received on Thu Nov 21 2002 - 12:23:38 CST

Original text of this message

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