union query (1 Viewer)

lipin

Registered User.
Local time
Today, 04:25
Joined
May 21, 2002
Messages
149
I have two tables(ONE & TWO) with the same fields.
You probably ask why two tables just alike, well I am importing them both from other departments to do some comparisons on.

For simplicity, lets say there are two fields
Name and Salary.

I am trying to use a union query to show each name once, with Salary total. I can't get the salaries to add, or the name to show up only once. Below is the statement I am trying but I can't figure what to put in WHERE line. Am I close to being on the right track? Is union query what I should be using?

Thanks for helping out.

SELECT [NAME],[SALARY]
FROM [ONE]
WHERE ???

UNION SELECT [NAME],[SALARY]
FROM [TWO]
WHERE ???
 

lipin

Registered User.
Local time
Today, 04:25
Joined
May 21, 2002
Messages
149
OK, still trying to get union query to work
I have:

SELECT [NAME],[SALARY]
FROM [ONE]

UNION SELECT [NAME],[SALARY]
FROM [TWO]

and when I run it, I get an input box asking for SALARY parameters. Why?
I jsut want it to show all the records from both tables.
 

lipin

Registered User.
Local time
Today, 04:25
Joined
May 21, 2002
Messages
149
OK, NEVERMIND ON THAT ONE, I GOT THE UNION QUERY CORRECT.
 

Users who are viewing this thread

Top Bottom