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: Select Family, First (Name) from ... group by Family

Re: Select Family, First (Name) from ... group by Family

From: Thomas Olszewicki <ThomasO_at_cpas.com>
Date: Thu, 24 Feb 2000 15:17:32 GMT
Message-ID: <gYbt4.43673$632.1822706@news1.rdc2.on.home.com>


Patric,
Jonathan and Dmitry are trying to point major difference between : Record oriented database (Access, DBase, Btree and others) and
Set oriented database (SQL Server, Oracle Sybese , Informix ). In a nutshell: in set oriented database there is no guarantee of first, last row without specifying
ORDER BY in your select statement.
In Oracle there is a little trick you may want to explore. Try this:

Select A.Family,A.Name,A.Weight
from People A
Where A.ROWID=(SELECT MAX(B.ROWID) FROM People B WHERE A.Family=B.Family)

ROWID is similar to record number and with some limitations it may give you same result as
Access function First()

HTH
Thomas

Select A.Family,A.Name,A.Weight
from People A
Where A.ROWID=(SELECT MAX(B.ROWID) FROM People B WHERE A.Family=B.Family)

"Patrick Joyal" <please.reply_at_to.the.newsgroup> wrote in message news:38b45de8_at_news...
> >
> >N.B. For a friendlier answer, try
> >a more positive approach.
> >
>
>
> And what would be a "more positive approach", dumbass?
> I was pissed off because a "powerful" database system like Oracle wouldn't
> support a function so basic that even Access support, and now there's this
> smart ass
> who think that someone using "low-technologies" like Access and VB instead
> of Oracle and Java is not good enough to have polite answer to his polite
> question.
>
> Excuse-me, your majesty, but if my question wasn't "friendly" or
"positive",
> maybe it is
> because I wasn't born speaking english, the "international" language (as
> americans would think).
>
> That said, someone have an answer to my original question.
>
> Merci
>
> Patrick
>
>
Received on Thu Feb 24 2000 - 09:17:32 CST

Original text of this message

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