SELECT * FROM ( VALUES ('1'), ('3.3'), ('1.1'), ('4.5.6'), ('1.4.3.1.1'), ('11.2') ) v (version) ORDER BY CAST('/' + version + '/' AS hierarchyid) ;
Example: order by CAST('/' + ColumnName + '/' AS hierarchyid)
very useful information..
very useful information..
ReplyDelete