Below is my query -
DELETE
FROM activity_details as ad, edit_details as ed
LEFT JOIN edit_details as ed
ON ed.details_id = ad.row_id
WHERE year(ad.activity_datetime) = year(GETDATE())-10
I am getting error SQL Error [156] [S1000]: Incorrect syntax near the keyword 'as'. SQL Error [156] [S1000]: Incorrect syntax near the keyword 'as'.
Can you please help me correct the syntax