Something like:

WHERE DATEDIFF(m, date_set) > 5

Test the boundary cases though, dates can get you in trouble :O)

Ade

-----Original Message-----
From: Protoculture [mailto:[EMAIL PROTECTED]
Sent: 02 February 2006 11:13
To: CF-Talk
Subject: ms sql - delete records where older than 6 months


How would I finish the following sql statement to delete all records older
than 6 months?

delete * from mytable_fav_cvs
where date_set
.......



cheers


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231087
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to