Union Query Where Clause

Joined
Jun 17, 2014
Messages
3
Reaction score
0
Hello! I have a union query bringing in info on three tables for me - works great. I'd like to find the info for just a certain date frame but when I add the date criteria, it returns all dates. Here's what I've tried:

SELECT [MODEL_NO], [VIN], [REASON], [DATE RETURNED]
FROM [FBMC Customer Addresses GSX-R1000]
WHERE [REASON] = '22 - VEHICLE STOLEN' OR [REASON] = '20 - VEHICLE SCRAPPED / TOTAL LOSS' OR [REASON] = '19 - VEHICLE EXPORTED' and [DATE RETURNED]>03/31/14
UNION
SELECT [MODEL_NO], [VIN], [REASON], [DATE RETURNED]
FROM [FBMC Customer Addresses GSX-R600]
WHERE [REASON] = '22 - VEHICLE STOLEN' OR [REASON] = '20 - VEHICLE SCRAPPED / TOTAL LOSS' OR [REASON] = '19 - VEHICLE EXPORTED' and [DATE RETURNED]>03/31/14
UNION SELECT [MODEL_NO], [VIN], [REASON], [DATE RETURNED]
FROM [FBMC Customer Addresses GSX-R750]
WHERE [REASON] = '22 - VEHICLE STOLEN' OR [REASON] = '20 - VEHICLE SCRAPPED / TOTAL LOSS' OR [REASON] = '19 - VEHICLE EXPORTED' and [DATE RETURNED]>03/31/14;

Help?:confused:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top