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: ??? What is the substitution for the function FIRST in ORACLE????

Re: ??? What is the substitution for the function FIRST in ORACLE????

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Sat, 26 Feb 2005 10:27:09 -0800
Message-ID: <armdnaACf8jAIr3fRVn-pQ@comcast.com>


Just take one of them, doesn't matter which one since they are the same. There is no order in a table unless you ask for the set in a particular order.
Jim
"G-Shock" <g-shock_at_g-shock.com> wrote in message news:4220b725$1_at_news.012.net.il...
> Hi There,
>
> there is a table wich includde for examples these fields:
> FROM_DATE, TO_DATE, DURATION, SOURCE, DESTINATION, ORIGIN_FILE,
ORIGIN_ROW,
> COMMENT... and so on.
>
> What i need is to find the duplicate rows by the fields: FROM_DATE,
TO_DATE,
> DURATION, SOURCE, DESTINATION and
> to filter all the duplications.
> For the select as above i'll get all the unique rows as mentioned on the
> group by.
> for each row i need the values for the fields: ORIGIN_FILE, ORIGIN_ROW,
> COMMENT wich exist in the first row.
> MS-Access hes FIRST() function but Oracle ): hasn't.
>
> ??? What is the substitution for the function FIRST in ORACLE????
>
> SELECT FROM_DATE,
> TO_DATE,
> DURATION,
> SOURCE,
> DESTINATION,
> First(ORIGIN_FILE),
> First(ORIGIN_ROW),
> First(COMMENT)
> FROM Table
> GROUP BY FROM_DATE,
> TO_DATE,
> DURATION,
> SOURCE,
> DESTINATION
> HAVING Count(*)>1;
>
>
> Thanks.
>
>
Received on Sat Feb 26 2005 - 12:27:09 CST

Original text of this message

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