Results 1 to 4 of 4
  1. #1
    JessieBee is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    2

    Union query- 9 Queries

    Hi
    I'm really struggling to work a union query. I have 9 queries that I need to have as 1 dataset. I've been putting:

    SELECT bookcode, code, propcode, bookdate, status, sdate, fdate, duration, adults, children, babies, pets, holidayprice, hh_net, prop-postcode, customer_postcode, X, Y, Mosaic_UK_Group, Mosaic_UK_Type, Expr1 FROM LateSummer
    UNION [ALL]
    SELECT bookcode, code, propcode, bookdate, status, sdate, fdate, duration, adults, children, babies, pets, holidayprice, hh_net, prop-postcode, customer_postcode, X, Y, Mosaic_UK_Group, Mosaic_UK_Type, Expr1 FROM SummerHols;

    LateSummer and SummerHols are two of the queries.

    Does the SQL look wrong?



    Thanks!

    Jess

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try without the brackets around ALL.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    In addition to pbaldy's suggestion,
    LateSummer and SummerHols are two of the queries.
    if possible, see if the 2 queries can be replaced with a single query .

    Thanks

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725

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

Similar Threads

  1. A RecordSet based on a Union Queries
    By Paul H in forum Programming
    Replies: 3
    Last Post: 05-31-2012, 02:05 PM
  2. One filter for 3 Queries in Union Query
    By rlsublime in forum Access
    Replies: 3
    Last Post: 03-20-2012, 04:01 PM
  3. Union Queries
    By tarhim47 in forum Queries
    Replies: 6
    Last Post: 05-26-2011, 12:20 PM
  4. Union Queries when Splitting Database
    By jaypoppin in forum Queries
    Replies: 3
    Last Post: 03-04-2011, 06:06 PM
  5. Replies: 3
    Last Post: 05-21-2010, 03:57 PM

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