Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    120
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Invalid Procedure Call on a UNION Query: what to do?

    I am trying to perform a Union of the results from 3 very simple Select Queries, each of which pulls a different portion of one source query, and modifies two fields with alpha information (text). When I try to perform the UNION, I get the Invalid Procedure Call message. I have tried putting an extra Select Query between the three original Queries and the Union, and gave them names without spaces, but no help.
    Any ideas, please?
    I'm a long-time user, but at a very unsophisticated level. I can read SQL, but mostly use the point-and-click of Access to create what I need.
    thanks
    Bob

  2. #2
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    120
    Thanks
    3
    Thanked 2 Times in 2 Posts
    I've found a way to do more research on this problem. The issue is caused by one field only. T he content of that field comes from a Left(...field..., variable number of characters). Can the problem be that the resulting field size is different in the queries that I'm trying to do the UNION on? If so, how does one specify what the resulting field width should be from the Left operation?
    thanks
    Bob

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    120
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Aha, I found a solution: use UNION ALL, rather than UNION. I have no idea whatsoever why this should make any difference, but it surely does!

  4. #4
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Midwest, USA
    Posts
    108
    Thanks
    5
    Thanked 5 Times in 4 Posts
    Thanks for posting this. Now maybe someone can explain the difference between Union and Union All.

  5. #5
    Star Lounger
    Join Date
    Jul 2013
    Location
    Murphy, NC
    Posts
    64
    Thanks
    0
    Thanked 8 Times in 8 Posts
    Hi caveman,
    According to http://docs.oracle.com/cd/B28359_01/...queries004.htm, Union excludes duplicate results, whereas Union All does not.

    Dave

  6. The Following User Says Thank You to DavidHLevin For This Useful Post:

    caveman144 (2014-10-22)

  7. #6
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Midwest, USA
    Posts
    108
    Thanks
    5
    Thanked 5 Times in 4 Posts
    Thanks David. I should have recognized the Oracle terminology.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •