 | 
28-Jul-2006, 08:15 AM
|  | Guest | | | | | | | | | | Prevent Duplicates from Union Query 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! | 
28-Jul-2006, 08:15 AM
|  | Guest | | | | | | | | | | 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;
>
> | 
28-Jul-2006, 08:15 AM
|  | Guest | | | | | | | | | | RE: Prevent Duplicates from Union Query 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
>
> | 
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! | (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 | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | Panjabi Today 02:14 AM 9 Replies, 203 Views | | | | | | | » Books You Should Read... | | | |