Results 1 to 5 of 5
  1. #1
    pmp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    3

    Post Union Query Help

    Can someone please tell me why I am getting a syntax error for this query?



    I am not a geek in access but I know that this query can also be broken up, please assist me with completing either task:

    1. Running the current query
    2. Breaking the query into months/quarters

    I've attached the query in notepad for ease of use.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    What is the exact error message?

    That query is too much to try to read through. Did you test each SELECT query individually in Access query designer?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    pmp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    3
    Thanks so much for taking the time to read my issue and respond. I am getting a syntax error. No I have not tested each aspect of the query. Reviewing the query can you assist me with determining how to break the query up for testing. I tried but it said my statement was incomplete. I wrote it from SQL and I am new to both SQL and Access.

    I agree, the query is too much I just recieved it from another department but don't have a clue how to execute or trouble shoot the error.

    Again, thanks!

    PMP

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Use the Access query designer to build and test SELECT query. I have always switched to SQL View to type in the DISTINCT keyword but just realized this can be selected in the Property Sheet dialog. It is Unique Values property.

    You can copy/paste into SQL View any of the nested SELECT statements from the UNION.

    Assumes you have the relevant tables either in your project or links to them.

    You say it gives a syntax error message but what is the EXACT full message?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    pmp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    3
    Thanks! I am in the process of doing the queries and will let you know my progress.

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

Similar Threads

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