A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Union Query Removing records



 
 
Thread Tools Display Modes
  #1  
Old May 1st, 2008, 11:56 PM posted to microsoft.public.access.queries
Emma Aumack
external usenet poster
 
Posts: 34
Default Union Query Removing records

Does anyone know why a union query would remove records?

I have three data tables that I combine to get total sales and for some
reason when I use the union query records go missing.
--
www.bardpv.com
Tempe, Arizona
  #2  
Old May 1st, 2008, 11:58 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Union Query Removing records

Try modifying the union like this ---
UNION ALL SELECT .....
--
KARL DEWEY
Build a little - Test a little


"Emma Aumack" wrote:

Does anyone know why a union query would remove records?

I have three data tables that I combine to get total sales and for some
reason when I use the union query records go missing.
--
www.bardpv.com
Tempe, Arizona

  #3  
Old May 2nd, 2008, 12:13 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Union Query Removing records

On Thu, 1 May 2008 15:56:24 -0700, Emma Aumack wrote:

Does anyone know why a union query would remove records?

I have three data tables that I combine to get total sales and for some
reason when I use the union query records go missing.


Records that are duplicates (in the fields selected in the queries) will
indeed be removed. UNION ALL instead of UNION causes all records to be
retrieved, duplicates or not.
--

John W. Vinson [MVP]
  #4  
Old May 2nd, 2008, 02:18 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default Union Query Removing records

Emma

If the earlier responses have not identified your solution, please post the
SQL statement that your query uses.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

"Emma Aumack" wrote in message
...
Does anyone know why a union query would remove records?

I have three data tables that I combine to get total sales and for some
reason when I use the union query records go missing.
--
www.bardpv.com
Tempe, Arizona


  #5  
Old May 2nd, 2008, 05:47 PM posted to microsoft.public.access.queries
Emma Aumack
external usenet poster
 
Posts: 34
Default Union Query Removing records

That was it. Thank you!
--
www.bardpv.com
Tempe, Arizona


"John W. Vinson" wrote:

On Thu, 1 May 2008 15:56:24 -0700, Emma Aumack wrote:

Does anyone know why a union query would remove records?

I have three data tables that I combine to get total sales and for some
reason when I use the union query records go missing.


Records that are duplicates (in the fields selected in the queries) will
indeed be removed. UNION ALL instead of UNION causes all records to be
retrieved, duplicates or not.
--

John W. Vinson [MVP]

 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.