VB select distinct Fax, Co_nam from tableA doesn't 
Author Message
 VB select distinct Fax, Co_nam from tableA doesn't

May be you have more than one Co_nam with same Fax,

Quote:

> I am using VB to run a select query to unique the fax number from a table,

but it only work when I use following query:
Quote:

>     select distinct Fax from tableA where fax is not null

> if I use

>     select distinct Fax, Co_nam from tableA

> the result doesn't unique the fax number.





Wed, 28 Apr 2004 04:38:33 GMT  
 VB select distinct Fax, Co_nam from tableA doesn't
Tom,

If your 1st select works, but the 2nd one doesn't (i.e. you get duplicate
fax numbers, it means that some fax numbers in your table are associated
with >1 company name. typically this might happen where the company name is
input slightly differently (e.g. "ACME Inc.", and "ACME Inc" are 2 different
strings, but are actually the same company). Your SQL is fine, but you
probably need better input parsing when adding companies to your list.

Barry

Quote:

> I am using VB to run a select query to unique the fax number from a table,

but it only work when I use following query:
Quote:

>     select distinct Fax from tableA where fax is not null

> if I use

>     select distinct Fax, Co_nam from tableA

> the result doesn't unique the fax number.





Wed, 28 Apr 2004 21:23:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB select distinct Fax, Co_nam from tableA doesn't

2. VB select distinct Fax, Co_nam from tableA doesn't

3. VB select distinct Fax, Co_nam from tableA doesn't

4. VB select distinct Fax, Co_nam from tableA doesn't

5. vb Select * from tableA?How to select record from 1000 to 2500

6. vb Select * from tableA?How to select record from 1000 to 2500

7. vb Select * from tableA?How to select record from 1000 to 2500

8. vb Select * from tableA?How to select record from 1000 to 2500

9. vb Select * from tableA?How to select record from 1000 to 2500

10. vb Select * from tableA?How to select record from 1000 to 2500

11. SELECT DISTINCT yields more than SELECT

12. Change SELECT to SELECT DISTINCT?

 

 
Powered by phpBB® Forum Software