Subject | Re: [ib-support] DISTINCT |
---|---|
Author | Doug Chamberlin |
Post date | 2001-08-23T18:02:54Z |
At 8/23/2001 01:59 PM (Thursday), Mike Grover wrote:
selecting *, then all fields in each record must comprise a distinct
combined value. Since every record is different (in some field) you get
them all listed.
SELECT DISTINCT ZIP, ZIP4 WHERE ZIP='66846' AND ZIP4='1160'
would yield one record with the values 66846, 1160.
Ain't SQL fun!
>I have been trying to use a query statement like this:The DISTINCT applies to all the fields you are selecting. Since you are
>
>"SELECT DISTINT * FROM EXPERIAN WHERE ZIP='66846' AND ZIP4='1160'"
>
>But Get all matching records, not just the first one.
selecting *, then all fields in each record must comprise a distinct
combined value. Since every record is different (in some field) you get
them all listed.
SELECT DISTINCT ZIP, ZIP4 WHERE ZIP='66846' AND ZIP4='1160'
would yield one record with the values 66846, 1160.
Ain't SQL fun!