The problem with select distinct is if you're select more than one column at
a time. It will return distinct ROWS. Not just the one column you specify.
--K
-----Original Message-----
From: Harold Goodson [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 10:48 AM
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/[email protected]/
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/[email protected]/
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.