I have a table in SQL Server that has an item number that I need to be able to sort by. The item numbers could be something like10, 91, 94, 95 (these ones are fairly easy to sort) however I am stuck when the numbers come through like:
The correct sequence should be 1, 1.3.1, 1.3.1.1, 1.3.1.2, 1.3.2, 1.3.10, HCV1001
I can get the query to work if the I don't have anything HCV1001 using the Hierarchy ID datatype, but this fails when using something that starts with a letter. The problem I have is that these numbers can vary from project to project and are generated through an applications