Re: simple query with distinct keyword
- From: "Welie" <welyakim@xxxxxxxxx>
- Date: 12 Sep 2006 10:41:04 -0700
issac wrote:
Hi folks
Im trying to do a simple query involving the distinct keyword and an
access 2000 db, but have been frittering with it for amost and hour
and a half and I cant make it work.
This is the SQL I would run if it were valid syntax, but it's not:
Select COLOR1, COLOR2, distinct DESC from COLORS;
TABLE COLORS
---------------------------------------
| COLOR1 | COLOR2 | DESC |
---------------------------------------
.... blue....... red........ugly
....yeller...... red.......orange
....green......blue.......ugly
....red........green......ugly
---------------------------------------
I want to select all columns in the table, but only those rows with
distinct values in the column 'Desc'.
so my returned row countfrom that table would be 2:
.... blue....... red........ugly
....yeller...... red........orange
I am a bit of a newb to SQL, so pardon the 'basicness' of my question
Issac-
Why do you say that the row returned for ugly would be
blue..red...ugly. Maybe you want green..blue..ugly? What I'm saying is
does it matter which row is returned?
Issac
.
- Follow-Ups:
- Re: simple query with distinct keyword
- From: issac
- Re: simple query with distinct keyword
- References:
- simple query with distinct keyword
- From: issac
- simple query with distinct keyword
- Prev by Date: Re: bound continuous form becoming unsynchronized (help)
- Next by Date: Re: DCount
- Previous by thread: simple query with distinct keyword
- Next by thread: Re: simple query with distinct keyword
- Index(es):