If I understand your question correctly, the first thing you want to avoid is using cursors. Those will seriously slow you down.
Instead try deleting in reasonable sets using a date range. The size of the range depends on the amount of data per each day versus how much you want to delete using a single run.
For example you can delete rows in chunks of months like following:
DELETE FROM [CampaignUpcDept] WHERE DateColumnName <= DATEADD(month, -50, GETDATE()));
DELETE FROM [CampaignUpcDept] WHERE DateColumnName <= DATEADD(month, -49, GETDATE()));
DELETE FROM [CampaignUpcDept] WHERE DateColumnName <= DATEADD(month, -48, GETDATE()));
...
Just select the starting point so that the first run will delete only one month. In other words set the condition far enough to the past.
Some other things to take into consideration:
- Of course you back up the data first
- If the amount of data to be deleted is large, consider committing in between calls in order to avoid unnecessary growth of the log file
- consider using bulk logged or simple recovery model to speed up the operation. HOWEVER, before changing the recovery model, carefully consider the consequences. Read Recovery Models (SQL Server)[^]