delete tbltravel as tt1 where tt1.travelerid, tt1.recordlocator in
(SELECT tblTravel.TravelerID, tblTravel.RecordLocator,max(TravelDate)
FROM tblTravel
group by travelerid,recordlocator
having max(traveldate) < date()-30)
This doesn't work def.. I need a solution where u can condition on 2 fields for delete statement with the result from a subquery.
(SELECT tblTravel.TravelerID, tblTravel.RecordLocator,max(TravelDate)
FROM tblTravel
group by travelerid,recordlocator
having max(traveldate) < date()-30)
This doesn't work def.. I need a solution where u can condition on 2 fields for delete statement with the result from a subquery.