Grouping Distinct

  • Thread starter Thread starter acss
  • Start date Start date
A

acss

I have a query utilizing distinct as follows:

SELECT DISTINCT Vendor.VendorCtry
FROM Vendor
ORDER BY Vendor.VendorCtry;

The problem is that when the query is run it displays a country twice like
Turkey on one row and then the next. I have tried the grouping but have the
same results, is there another way to group records?
 
If the country shows twice, there is a subtle differenc between the 2
entries, e.g. one entry might have a leading space.

To help track this, try:

SELECT DISTINCT Vendor.VendorCtry,
Len(Vendor.VendorCtry) AS HowManyChars
FROM Vendor
ORDER BY Vendor.VendorCtry;
 
Thanks Allen,

You were right on with the leading space and i removed it by doing a search.
I did not get your "AS HowManyChars" so was i supposed to place numbers
following AS TO obtain an search?
 
Good solved.

You posted your query statement (presumably from SQL View of a query.) Try
pasting what I suggested into query design if you want to experiment.
 
Back
Top