Help with Sort in numerical order

liunx

Guest
In a query, I have a column, "text" data type, that is sorted in default ascending order with the following values:

UniqueID
AAA.BBB.1
AAA.BBB.10
AAA.BBB.11
AAA.BBB.2
AAA.BBB.3
AAA.BBB.4
AAA.BBB.5
AAA.BBB.6
AAA.BBB.7
AAA.BBB.8
AAA.BBB.9
CCCC.DD.1

I want to sort them in ascending order and then by the characters "to the right"
of the second dot, putting them in numerical order like below. I thought I could do this in a hidden field in the query. Using Right/Trim to remove all previous characters, leaving 1, 2, 10 and then identify a numerical order to apply to the query. Help...how do you do this?


Resulting sort in the Query
AAA.BBB.9
AAA.BBB.10
AAA.BBB.11
CCCC.DD.1in your query just add

sort by UniqueID ASCshow me what you are using for the query.
 
Back
Top