The query you should will return every record in the Customers table. I think you're saying you only want distinct customers. In a well-designed database, that should be every record, but you can eliminate exact duplicates by adding the DISTINCT keyword:
SELECT DISTINCT * FROM Customers;
However, in the real world, the kind of duplication you get in a customer table isn't as simple as exact duplicates. It's having one record for Bob Space and another for Robert Space and a third for R. Space. This is a business problem, not a database problem and there's no simple query that's going to solve it for you.
If I haven't answered the right query, please explain what you were trying to ask.
Your Select statement will give you ALL fields for ALL people in your Customers table.
Unless you have other requirements "to list different people"...
Usually the easiest way to ask a question is:
This is the data I have:
[tt]blah, blah, blah[/tt]
and this is what I would like to have as an output:
[tt]ABC, XYZ[/tt]
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
Well, yes, it's right if you really want all fields from all customers. But you originally said you wanted "different people". As Tamar pointed out (above), if you have more than one record for a given customer, your query won't give you one row for that customer; it will give you all rows for the customer.
I suspect that the latter is what you want. When you said "different people", you really meant "all people". The problem is that when you are specifying the information you want to extract from a database, you have to mean ultra-precise. A word like "different" could make all the difference.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Bob, I don't know about fluent, but I do work with that language - as you can see from the discussions we have had recently in the VFP forum. Do you have a special reason for asking?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Yes, I'm interested in FoxPro, but it ended in 2003 so what is the use. Do you have a download for he software? I have never actually coded with the language, though. I can code in VBS (barely lol), APPLESOFT BASIC, and SQL.
As this is the SQL Server forum, it is not the place to discuss Visual FoxPro. You should go to forum184. In fact, I have already answered the above question there.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.