Results 1 to 3 of 3
  1. #1
    Bedsingar is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jul 2011
    Posts
    12

    Union Query Dropping Records

    Hello,

    I have a problem with one of my union queries which seems to be dropping records and I can't understand why...

    Code for the Query is:

    Code:
    SELECT *
    FROM [APPROVED_FIA_Excluding Prior Years]
    UNION SELECT *
    FROM [Format_Prior_Years_Actuals]
    UNION SELECT *
    FROM [Format_FIA_DATA_2]
    UNION SELECT *
    FROM [FORMAT_SEED]
    UNION SELECT *
    FROM [CAP_ROLLOVER_P1]
    UNION SELECT *
    FROM [CAP_ROLLOVER_P2]
    UNION SELECT *
    FROM [REV_ROLLOVER_P1]
    UNION SELECT *
    FROM [REV_ROLLOVER_P2];
    Resultant Record Count = 12403

    [APPROVED_FIA_Excluding Prior Years] =891
    [Format_Prior_Years_Actuals] =4416
    [Format_FIA_DATA_2] = 7736
    [FORMAT_SEED]=96
    [CAP_ROLLOVER_P1]=7
    [CAP_ROLLOVER_P2]=7
    [REV_ROLLOVER_P1]=6
    [REV_ROLLOVER_P2]=6

    So resultant count should be 13165 meaning I've somehow lost 762 records.



    Can anybody explain why this is happening??

    Thanks

    Josh

  2. #2
    Bedsingar is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jul 2011
    Posts
    12
    Oh ok I see... Union ALL is what I needed Solved

  3. #3
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    For others viewing this thread, this link will explain the difference between a Union Query and a Union All Query.

    http://office.microsoft.com/en-us/ac...010206109.aspx

    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Union Query
    By jlclark4 in forum Queries
    Replies: 3
    Last Post: 02-25-2011, 08:21 PM
  2. Union Query Help
    By jo15765 in forum Queries
    Replies: 7
    Last Post: 01-06-2011, 05:46 PM
  3. Please help me out with union query
    By radicrains in forum Access
    Replies: 1
    Last Post: 10-29-2010, 01:48 AM
  4. Replies: 0
    Last Post: 03-15-2010, 01:53 PM
  5. Need help with a Union Query
    By jdowdy in forum Access
    Replies: 1
    Last Post: 10-13-2009, 05:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums