- Nov 18, 2001
- 13,234
- 2
- 81
Is it possible to have the distinct clause look at only one column, when selecting multiple columns?
For example, if I have a select command like so:
SELECT DISTINCT t_Address.chrCountry AS EnteredCountry, t_Address.*
FROM t_Address INNER JOIN
Country ON t_Address.chrCountry <> Country.nvcCountry
This returns every row that is completely distinct from another row. However, what I want is every row with a distinct t_Address.chrCountry. How can I achieve this?
For example, if I have a select command like so:
SELECT DISTINCT t_Address.chrCountry AS EnteredCountry, t_Address.*
FROM t_Address INNER JOIN
Country ON t_Address.chrCountry <> Country.nvcCountry
This returns every row that is completely distinct from another row. However, what I want is every row with a distinct t_Address.chrCountry. How can I achieve this?