when you
select distinct(name), foo, bar, baz ...
it returns all the distinct combinations of the selected fields.
Chris Olive,
DOEHRS Website Administrator
-----Original Message-----
From: Harold Goodson [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 1:48 PM
To: [EMAIL PROTECTED]
Subject: Select Distinct not so distinct
Hi all,
I'm trying to select all of the values from a table where type=foo and I
would like to eliminate duplicates based on name.
EG.
SQL="select distinct(name), other, field, names from table where type = foo"
-this returns every field where type is a match.
SQL="select distinct(name) from table where type = foo"
-this works but does not retrieve additional field info.
Am I to understand that select distinct cannot be utilized in this fashion?
It works if I select the name field only, but if I want more than the name
field it returns all matches. I cannot ask that the database be
restructured.
Is that just the way it is?
-Andy
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.