Re: Removing duplicates from query, but not from table

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dear Don:

Removing exact, total duplicates from a UNION is automatic as long as it's
not UNION ALL. If there's an ALL after UNION, try removing that.

Tom Ellison


"tyrfboard" <htmldon@xxxxxxxxx> wrote in message
news:1134669774.410071.109790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I've been searching for awhile now on how to remove duplicates from a
> table within an Access db and have found plenty of articles on finding
> or deleting duplicates. All I want to do is remove them from within an
> SQL query - leaving one of the records behind of course.
>
> I have a mailing list comprised of a union query that gets records from
> two separate tables.
> I want to be able to run a query that removes one (or more) of the
> duplicated addresses within the query but doesn't make any
> modifications to the table.
>
> Please help! :)
>


.



Relevant Pages

  • Re: Establishing Precedence In ORDERBY Condition Causing Problems.
    ... in the query, prefix all your columns with aliases (or the table ... in the query where you use the CTE: ... of the procedure to avoid duplicates it seems to have thrown off the ...
    (comp.databases.ms-sqlserver)
  • RE: Want to edit a table based on a query of a query of several qu
    ... First create union query like this -- ... Use that query in design view and add all of the other nine tables. ... This puts all the data in to a single query output without duplicates. ... Then I run a big query of all 9 queries to consolidate the data into one big ...
    (microsoft.public.access.queries)
  • Re: split records
    ... A UNION query is constructed by writing a set of SELECT queries, ... The words UNION or UNION ALL are then placed between the SELECT ... be duplicates, or when you want to preserve duplications, use ALL. ... constraints). ...
    (microsoft.public.access.queries)
  • RE: Finding a value in several different columns
    ... You didn't say what to do with duplicates (that is, ... tables in query design view). ... putting a UNION ALL ... "Nick Xylas" wrote: ...
    (microsoft.public.access.queries)
  • Re: Establishing Precedence In ORDERBY Condition Causing Problems.
    ... in the query, prefix all your columns with aliases (or the table ... of the procedure to avoid duplicates it seems to have thrown off the ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)