BrandonGalderisi,
I don't believe that this is returning exactly what I am looking for. I want to delete rows more than 2 years old as long as there is not a record in B or C within the 2 years.
Perhaps include in the join condtion for both A and B
AND dateEntered >= '8/18/2006' ?
and the where clause:
where (b.FirstName is NULL or c.P_FirstName is null) AND g.dateentered < '8/18/2006' ?
Main Topics
Browse All Topics





by: BrandonGalderisiPosted on 2008-08-19 at 08:08:00ID: 22260469
The below will select A records to be deleted.
Remove the two -- to test your delete to make sure the record counts match up.
Run with a commit at the end instead of the rollback to do the delete.
Select allOpen in new window