Union Query

waredata

New member
Local time
Today, 15:13
Joined
Apr 19, 2011
Messages
9
I have three select query that I would like to run together.
I know the fields has to be the same. (They are)

I know:
SELECT field1,field2, etc
FROM [Name of query]
UNION
SELECT field1,field2, etc
FROM [Name of query];

How do i add the third query?? Do I just repeat the above, for one more??

I would like to add a parameters to one field, I know to use
WHERE ?????? field is [Posted Date], parameter would be: Between[BegDate]AND[EndDate] How do i set this up in the UNION query, and where to place in the SQL above?
 
You can repeat the UNIOS statement as many times as you like, I think... Your second question talks about parameters but "Between [begdate] and [enddate]" sound like criteria... just put this in the SQL statement after the FROM line in each query, as in
Code:
WHERE tablename.[posted date] between tablename.[begdate] and tablename.[enddate]
 

Users who are viewing this thread

Back
Top Bottom