I'm trying to run a date range query which works, but I also need to get data outside of the date range inside of the same query which I get to work. The issue I'm having is when the start date is in say 2011 and the end date is 2012. I need to get some information that is in 2010 and 2009. Is there a way to do this?
Below here is the query I'm working on,
SELECT * FROM tbl_customers
INNER JOIN tbl_plans ON tbl_plans.ProductID = tbl_customers.ProductID
WHERE Status = "Active" AND State = "UT" AND (DateSignup BETWEEN '2010-11-1' AND '2010-12-1' AND PaymentCycle = "1") OR ((DateSignup BETWEEN '2010-11-1' AND '2010-12-1' AND PaymentCycle = "12"))
ORDER BY DateSignup asc;
I'm having a hard time trying to explain this, so if you need some information please let me know.
Thanks for your time
-BaSk