0
运行我的SQL查询后,结果是排序按字母和字符在SQL Server
1.12.1
1.12.2
1.12.3
1.12.4
1.12.5
1.12.6
1.12.7
1.12.8
1.12.9
1.12.10
1.12.11
1.12.2a
但我想这个结果( “2A” 后, “2”)
1.12.1
1.12.2
1.12.2a <-- This one must be here, not at the end of the result set
1.12.3
1.12.4
1.12.5
1.12.6
1.12.7
1.12.8
1.12.9
1.12.10
1.12.11
什么类型的SQL查询可以做到这一点?
这是我的查询......我使用SQL Server 2012
sResultSqlBuilder.Append( “ORDER BY {0} {1} ”)
如果的SortExpression =“” 那
sResultSql = String.Format(sResultSql,“Right('0000000000'+ FirstNumber, 10),Right('0000000000'+ SecondNumber,10),Right('0000000000'+ ThirdNumbersAndLetter,10) ”,“”)
什么是您的源数据?你目前的查询是什么? – 2013-03-22 09:45:17
MySql使用普通的'ORDER BY'对你想要的东西进行排序。你使用哪个DMBS? – JaMaBing 2013-03-22 09:47:52