Remove Repeating Results...

roystreet

Registered User.
Local time
Yesterday, 20:42
Joined
Aug 16, 2004
Messages
47
Hello,
I have a large table that displays employees and their organization they are in. I want to create a query that only displays the ORG field, but I also only want it to display one occurance of each org. This should give me a short list that allows me to see all of the orgs in the table. Some orgs have we will say 100 employees in that specific org - Lke the ORG AL400. I want the query to just display AL400 once. This is only for the purpose of displaying what ORGs there are, not employees.

thanks,
---roystreet
 
Select ORG
FROM MyTable
Group by ORG
Order by ORG

You can use QBE if you select the greek key E looking thing
 
Or set the query properties to return unique values (SELECT DISTINCT).
 
Hello,
I thank you for your assistance. I do have a table of which has both the employees name and the org they are associated with. I need both pieces of information. (All of this information/data is extracted from a much larger mainframe system that has a separate org table - So I'm not wanting to recreate that) This specific question just dealt with one aspect of the database I am working on. A simple SQL statement as the source for a drop down box that doesn't provide the name, but only the disctinct orgs is perfectly what I need. Tiro gave me the thing I needed - I appreciate it! Disctinct is the word I couldn't remember and once you said that, it worked perfectly. Each employee needs to have their associated org information identified with them so it's best that it stays in one table, especially since this new orgs are created old ones deleted and employees switch in between various orgs. This worked great! Thanks Again. :) I am NOT saying that is not useful to have a separate org table, but for the specific purposes of this database it's good to have that information in one place. I just remembered that there are orgs that have no employees and thus we don't want that information in this specific list.
---roystreet
 

Users who are viewing this thread

Back
Top Bottom