date - Keep 2 years of records in table when reference column is in a string format -


i want keep 2 years of records in table client wants keep reference column(referenceperiod) in string format.

so it's working when column in date format:

delete
dbo.gsufverification_testmylene
referenceperiod < dateadd(year,-2,getdate())

but can't make work converting column upfront. feel stupid right :-(

can me out please?


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -