Subject | RE: [ib-support] DISTINCT |
---|---|
Author | Mike Grover |
Post date | 2001-08-23T19:47:59Z |
Ok, I see.
what I am wanting to do is just get the first record that matches a query.
is there a way to get just the first matching record and not even read the
rest of the matching records?
mike...
-----Original Message-----
From: Doug Chamberlin [mailto:dchamberlin@...]
Sent: Thursday, August 23, 2001 1:03 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] DISTINCT
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!
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Do you need to encrypt all your online transactions? Secure corporate intranets? Authenticate your Web sites? Whatever
security your site needs, you'll find the perfect solution here!
http://us.click.yahoo.com/Bre3tC/Q56CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
what I am wanting to do is just get the first record that matches a query.
is there a way to get just the first matching record and not even read the
rest of the matching records?
mike...
-----Original Message-----
From: Doug Chamberlin [mailto:dchamberlin@...]
Sent: Thursday, August 23, 2001 1:03 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] DISTINCT
At 8/23/2001 01:59 PM (Thursday), Mike Grover wrote:
>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!
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Do you need to encrypt all your online transactions? Secure corporate intranets? Authenticate your Web sites? Whatever
security your site needs, you'll find the perfect solution here!
http://us.click.yahoo.com/Bre3tC/Q56CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/