I have a WHERE statement that pulls data from 4 different tables based on a date range... When I removed the "vc.follow_up_date I get information for the other follow_up_dates, but when I leave vc.follow_up_date in the query nothing is returned. The vc.follow_up_date doesn't have any data in its table for this date range either. When I put in data for this date range I get back the information. Does any one know why this is?
WHERE hc.follow_up_date
BETWEEN DATE_SUB(CURDATE() , INTERVAL 7 DAY)
AND DATE_ADD(CURDATE() , INTERVAL 7 DAY)
AND hm.follow_up_date
BETWEEN DATE_SUB(CURDATE() , INTERVAL 7 DAY)
AND DATE_ADD(CURDATE() , INTERVAL 7 DAY)
AND ip.follow_up_date
BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY)
AND DATE_ADD(CURDATE(), INTERVAL 7 DAY)
AND vc.follow_up_date
BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY)
AND DATE_ADD(CURDATE(), INTERVAL 7 DAY)";