Question: Say I have the following list:

```
<cfset myList = "1a,2b,3c,aa,bb,cc" >

```

How do I sort this list so that it will be "aa,bb,cc,1a,2b,3c"? In other words, I want anything that starts with a number to be at the end of the list and in order of the number it starts with.

Answer: 
I am assuming you are using MySql. I am not sure whether it will work on others, but I think it should. You can do this on database level if the source of the values is a single column. Try this:

```
SELECT column_name 
FROM   your_table 
ORDER BY IF(name RLIKE '^[a-z]', 1, 2), name

```

See this [runnable example on SQLFiddle.com](http://sqlfiddle.com/#!2/f7b96/2)
Here is a way to do it in the database. It shows the general idea. The specifics depend on the database engine which you didn't specify. 

```
select field1, field2, etc
, case when substr(field1, 1, 1) between '0' and '9' then 2 else 1 end sortby
etc

order by sortby, field1

```