Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Goldmine Filter Questions - Pullings Records in a timeframe

Status
Not open for further replies.
May 1, 2007
4
US
I want to be able to build a filter or query that will pull records that have been updated or created with the last 7 days or so without having to go in and edit/rebuild the filter every time I want to use it. Is there a way to do this?
 
I was working on a sql query and it looks like this but i am not having any luck with it.

SELECT C1.*, C1.CREATEON
FROM CONTACT1 AS C1
WHERE (((C1.CREATEON <= current_date and CREATEON >= DATE_SUB(current_date(),INTERVAL 7 day));
 
Try this:
Code:
SELECT C1.*, C1.CREATEON
FROM CONTACT1 AS C1
WHERE (C1.CREATEON <= getdate() and CREATEON >= (getdate()-7))

__________
Veni, Vidi, Visa: I came, I saw, I charged it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top