If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
dups in a query
I ran across this solution when looking for ways to eliminate dups in a query
I'm creating...The SELECT DISTINCT option seems like the answer for me, but I'm not familiar with code in Access...can someone simplify this for me and tell me where in the SQL view I should enter this text? Thanks so much! I feel so stupid - I forgot about DISTINCT... Thanks "Marshall Barton" wrote: Dan @BCBS wrote: Can I add a simple statement to a query to eliminate duplicates, without having to create a new query without making a new "Find Duplicates Query". example: Criteria = "no dups" No such criteria, but maybe SELECT DISTINCT . . . will do what you want? -- Marsh MVP [MS Access] |
#2
|
|||
|
|||
dups in a query
Open up the query in design view. Go to View then SQL View. Place the word
DISTINCT right after SELECT. Another option is to open up the query in design view. Go to View then Totals. By default Access will Group By all fields which is all but the same as adding the DISTINCT. Personally I like adding the DISTINCT better. Makes for cleaner looking SQL. However you don't see the DISTINCT in the QBE grid so Totals has an advantage when trying to find out why there aren't as many records as you think. -- Jerry Whittle Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "bejewell" wrote: I ran across this solution when looking for ways to eliminate dups in a query I'm creating...The SELECT DISTINCT option seems like the answer for me, but I'm not familiar with code in Access...can someone simplify this for me and tell me where in the SQL view I should enter this text? Thanks so much! I feel so stupid - I forgot about DISTINCT... Thanks "Marshall Barton" wrote: Dan @BCBS wrote: Can I add a simple statement to a query to eliminate duplicates, without having to create a new query without making a new "Find Duplicates Query". example: Criteria = "no dups" No such criteria, but maybe SELECT DISTINCT . . . will do what you want? -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
dups in a query
Thank you so much!!
"Jerry Whittle" wrote: Open up the query in design view. Go to View then SQL View. Place the word DISTINCT right after SELECT. Another option is to open up the query in design view. Go to View then Totals. By default Access will Group By all fields which is all but the same as adding the DISTINCT. Personally I like adding the DISTINCT better. Makes for cleaner looking SQL. However you don't see the DISTINCT in the QBE grid so Totals has an advantage when trying to find out why there aren't as many records as you think. -- Jerry Whittle Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "bejewell" wrote: I ran across this solution when looking for ways to eliminate dups in a query I'm creating...The SELECT DISTINCT option seems like the answer for me, but I'm not familiar with code in Access...can someone simplify this for me and tell me where in the SQL view I should enter this text? Thanks so much! I feel so stupid - I forgot about DISTINCT... Thanks "Marshall Barton" wrote: Dan @BCBS wrote: Can I add a simple statement to a query to eliminate duplicates, without having to create a new query without making a new "Find Duplicates Query". example: Criteria = "no dups" No such criteria, but maybe SELECT DISTINCT . . . will do what you want? -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
dups in a query
On Fri, 3 Mar 2006 09:01:34 -0800, Jerry Whittle
wrote: Open up the query in design view. Go to View then SQL View. Place the word DISTINCT right after SELECT. or, equivalently, view the Query's Properties and set the "Unique Values" property to Yes. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Toolbars, Drop-Down Menus | Rick | New Users | 1 | September 21st, 2005 11:17 AM |
SQL query showing diff between actual and budget | Bon | Running & Setting Up Queries | 3 | August 25th, 2005 12:07 PM |
Nested in-line Query | laura | Running & Setting Up Queries | 0 | February 11th, 2005 12:17 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Too Few Parameters error Mail Merge Access Parameter Query | Tony_VBACoder | Mailmerge | 3 | September 14th, 2004 12:15 PM |