Union Query asking for Parameter Value

  • Thread starter Thread starter stephiesunny
  • Start date Start date
S

stephiesunny

I want the query to pull in all values.
Both PaymentNet_Spend and PeopleSoft_Spend are queries.

SELECT [PaymentNet_Spend].[Trans ID], [PaymentNet_Spend].[Post Date],
[PaymentNet_Spend].[Trans Amount], [PaymentNet_Spend].[Display Name]
FROM PaymentNet_Spend
UNION ALL SELECT [PeopleSoft_Spend].[Trans ID], [PeopleSoft_Spend].[Post
Date], [PeopleSoft_Spend].[Trans Amount], [PeopleSoft_Spend].[Display Name]
FROM PeopleSoft_Spend;

Please let me know if you have any suggestions. Thanks!
 
I want the query to pull in all values.
Both PaymentNet_Spend and PeopleSoft_Spend are queries.

SELECT [PaymentNet_Spend].[Trans ID], [PaymentNet_Spend].[Post Date],
[PaymentNet_Spend].[Trans Amount], [PaymentNet_Spend].[Display Name]
FROM PaymentNet_Spend
UNION ALL SELECT [PeopleSoft_Spend].[Trans ID], [PeopleSoft_Spend].[Post
Date], [PeopleSoft_Spend].[Trans Amount], [PeopleSoft_Spend].[Display Name]
FROM PeopleSoft_Spend;

Please let me know if you have any suggestions. Thanks!

Since we have no information about the two queries nor about what you're
seeing (or expect to see, or want to see), I can't see how anyone can help.

Are you missing values that you think you should be seeing? Do the individual
queries return "all values" on their own? What specific problem are you
having, in other words?
 
There is no need to have three queries. Just take the first query and copy
the SQL and paste into the second, removing semicolon, and adding UNION.

Delete the first query.
 
John-

Both PaymentNet_Spend and PeopleSoft_Spend are queries that include the
Trans ID, Post Date, Trans Amount, and Display Name without any parameters
around them (when I run them on their own). I'm trying to merge these two
queries so that the data output can come from both queries if I want total
spend. But I have them separate so that I can keep the dollars separate for
other reporting. These queries are derived from numerous tables. PaymentNet
has approx. 150,000 lines of data and PeopleSoft has approx. 50,000. What I
expect to see are still the Trans ID, Post Date, Trans Amount and Display
Names, as I do when I run the queries separately and without the Union. I
want the merged data to be inclusive of ALL data, not with prompts for
parameters.

I hope that this is more clear. Thank you for your help :)

Stephanie
 
John-

Both PaymentNet_Spend and PeopleSoft_Spend are queries that include the
Trans ID, Post Date, Trans Amount, and Display Name without any parameters
around them (when I run them on their own). I'm trying to merge these two
queries so that the data output can come from both queries if I want total
spend. But I have them separate so that I can keep the dollars separate for
other reporting. These queries are derived from numerous tables. PaymentNet
has approx. 150,000 lines of data and PeopleSoft has approx. 50,000. What I
expect to see are still the Trans ID, Post Date, Trans Amount and Display
Names, as I do when I run the queries separately and without the Union. I
want the merged data to be inclusive of ALL data, not with prompts for
parameters.

That's what I'd expect that you WOULD see! What prompts do you get?
 
The prompts are PaymentNet_Spend.[Display Name] and PeopleSoft_Spend.[Display
Name]. I don't want to run the reports for ONLY one vendor, I want ALL
vendors inclusive, which is why I use UNION ALL in the query. So I'm a little
confused as to why it is asking for the Display Names of both. ....?????
 
Oh! I figured it out!! My query as written has "Display Name" with a space,
however my other query outputs have "DisplayName" with no space. Sheesh. I'm
still learning this database stuff and keep coming across funny things like
that. Thanks for your help John. :)
 
Oh! I figured it out!! My query as written has "Display Name" with a space,
however my other query outputs have "DisplayName" with no space. Sheesh. I'm
still learning this database stuff and keep coming across funny things like
that. Thanks for your help John. :)

Not that I did much... <bg>

Any time you get an unexpected prompt, the first thing to look for is this
kind of misspelled fieldname - anything in brackets that Access doesn't
recognize will be taken as a parameter and generate a prompt.
 
Back
Top