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

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -