Skip to content
Advertisement

Tag: sql-convert

Sort by year as nvarchar and then numerically

I have an nvarchar column that in essence stores the following data: The first two numbers represent the year created and the last numbers represent the id of the unit made that year. Whenever I sort I get the 99’s first and 19 last. I’d like to sort by latest year first and then numerically. I have tried converting to

Advertisement