I'm new to SQL statements, and I have a slight problem getting data from a week ago based on a modified date.
SELECT People.first, People.last, company.companyname, People.lastmodified
FROM job_prof
INNER JOIN People ON job_prof.cid = People.cid
INNER JOIN company ON job_prof.Id = company.id
-> WHERE People.lastmodified = DATE(DATE_ADD(GETDATE(), INTERVAL -7 DAY))
ORDER BY People.lastmodified DESC";
Example date in a table - 6/9/2011 12:08:01 PM
Any suggestions would be helpful.
thank
source
share