Results 1 to 3 of 3
  1. #1
    JayDee is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    9

    Union Query with missing values from one table

    I have the following Union Query



    SELECT TblRegnskap.KundeNr, TblRegnskap.Konto, TblRegnskap.År, TblRegnskap.Periode, "Regnskap" AS Type
    FROM TblRegnskap
    GROUP BY TblRegnskap.KundeNr, TblRegnskap.Konto, TblRegnskap.År, TblRegnskap.Periode
    UNION SELECT TblBudsjett2.KundeNr, TblBudsjett2.Konto, TblBudsjett2.År, TblBudsjett2.Periode, "Budsjett" AS Type
    FROM TblBudsjett2
    GROUP BY TblBudsjett2.KundeNr, TblBudsjett2.Konto, TblBudsjett2.År, TblBudsjett2.Periode;

    When I run this query, the field [KundeNr] contains a symbol that looks like a paper clip and not the information from the field [Kundenr] in the table [TblBudsjett2]
    This only happens on records from the [TblBudsjett2] not the [TblRegnskap]. Those records are fine.

    What am I doing wrong.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Is the Data Type for the KundeNr field in both tables exactly the same?
    Are there entries for all records in this field for both tables?

  3. #3
    JayDee is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    9
    I checked, and it turns out that the type was Binary in one of the tables after a make table query. So after I corrected this it works fine.

    many thanks

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

Similar Threads

  1. Union Query on one table
    By Wallatrix in forum Queries
    Replies: 1
    Last Post: 01-31-2013, 03:41 PM
  2. Replies: 8
    Last Post: 10-22-2012, 07:43 PM
  3. how to update in a table union all query
    By learning_graccess in forum Queries
    Replies: 4
    Last Post: 03-31-2012, 07:32 AM
  4. Showing zero values in a Union Query
    By coach32 in forum Queries
    Replies: 5
    Last Post: 09-06-2011, 07:46 AM
  5. Create table out of union query
    By DKruse1969 in forum Queries
    Replies: 2
    Last Post: 08-28-2009, 09:55 AM

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