14c06 Prevent Duplicates from Union Query
Sign Up |  Live StatsLive Stats    Articles 37,302| Comments 176,966| Members 19,397, Newest birinder| Online 342
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Prevent Duplicates from Union Query

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 100 USD (20%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Union Query Secret Squirrel Information Technology 2 28-Jul-2006 08:42 AM
Sorting UNION query miguel.guerreiro@talecris.com Information Technology 5 28-Jul-2006 08:42 AM
How do I prevent #deleted appearing before I update a query? Rosalind Information Technology 5 28-Jul-2006 08:08 AM
Graph From Union Query of crosstabs BeruthialsCat@gmail.com Information Technology 0 28-Jul-2006 08:07 AM
Prevent Duplicates Across Two Fields Smartin Information Technology 1 13-Nov-2005 17:33 PM


Tags
prevent, duplicates, union, query
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:15 AM
PPCO's Avatar PPCO
Guest
 
Posts: n/a
   
   
Prevent Duplicates from Union Query

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I have a simple Union Query, but it returns duplicates from my 2 tables. I am
using just the Union Select not Union All Select. Is there an easy way to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10733-prevent-duplicates-from-union-query.html
prevent the duplicates?

SQL:

Select Customerreffullname as customer, RequestDate as
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10733
RequestDateorNumberofDayssincelastpickup, RequestType
from qrypickuprequestMMCO

UNION select Customer, Dayssincelastpickup as
RequestDateorNumberofDayssincelastpickup, RequestType
from qryMutualInvoiceOrderLineLastPickupPastDeadline;



*







Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:15 AM
SusanV's Avatar SusanV
Guest
 
Posts: n/a
   
   
Re: Prevent Duplicates from Union Query

You could do SELECT DISTINCT * FROM YourUnionQuery...
--
hth,
SusanV

"PPCO" wrote in message
news:C4E358FA-B82E-4DC4-AC38-720112A0818A@microsoft.com...
>I have a simple Union Query, but it returns duplicates from my 2 tables. I
>am
> using just the Union Select not Union All Select. Is there an easy way to
> prevent the duplicates?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10733
>
> SQL:
>
> Select Customerreffullname as customer, RequestDate as
> RequestDateorNumberofDayssincelastpickup, RequestType
> from qrypickuprequestMMCO
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10733
>
> UNION select Customer, Dayssincelastpickup as
> RequestDateorNumberofDayssincelastpickup, RequestType
> from qryMutualInvoiceOrderLineLastPickupPastDeadline;
>
>



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:15 AM
Jerry Whittle's Avatar Jerry Whittle
Guest
 
Posts: n/a
   
   
RE: Prevent Duplicates from Union Query

  Donate Today!  
A UNION query can not return duplicate records. Something in the record MUST
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10733
be different for them to be returned. So you need to define what you consider
a duplicate. Is it one field or a combination of more than one field? Which
fields?
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"PPCO" wrote:

> I have a simple Union Query, but it returns duplicates from my 2 tables. I am
> using just the Union Select not Union All Select. Is there an easy way to
> prevent the duplicates?
>
> SQL:
>
> Select Customerreffullname as customer, RequestDate as
> RequestDateorNumberofDayssincelastpickup, RequestType
> from qrypickuprequestMMCO
>
> UNION select Customer, Dayssincelastpickup as
> RequestDateorNumberofDayssincelastpickup, RequestType
> from qryMutualInvoiceOrderLineLastPickupPastDeadline;
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10733
>
>

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Do you believe in...
Today 09:00 AM
167 Replies, 3,482 Views
Nitnem Gutka - Gurmukhi...
Today 08:09 AM
14 Replies, 16,367 Views
Map shows world's 'most...
Today 07:16 AM
13 Replies, 160 Views
Why are There so Many...
Today 06:19 AM
49 Replies, 4,800 Views
Learn Punjabi Yourself...
Today 05:41 AM
15 Replies, 7,604 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 05:32 AM
167 Replies, 4,289 Views
The Great Imp Debate
Today 05:28 AM
32 Replies, 477 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 05:16 AM
299 Replies, 7,377 Views
Textbooks Spotted...
Today 04:53 AM
5 Replies, 69 Views
BHOOTS (Ghosts) and...
Today 04:22 AM
92 Replies, 13,725 Views
Thought of the Moment!
Today 04:01 AM
105 Replies, 4,987 Views
Panjabi
Today 02:14 AM
9 Replies, 203 Views
Fresno Sikh Who Was...
Today 01:30 AM
0 Replies, 41 Views
Guns of the Nihangs...
Today 01:24 AM
0 Replies, 43 Views
Saudi Woman Makes...
Today 01:01 AM
0 Replies, 33 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 09:24 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.35348 seconds with 32 queries
0