# "ORDER by" vchar with number (filename)

**URL:** <https://forum.kirupa.com/t/order-by-vchar-with-number-filename/198048>\
**Category:** programming\
**Created:** [August 22, 2006, 1:00am UTC](https://forum.kirupa.com/t/order-by-vchar-with-number-filename/198048 "2006-08-22T01:00:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [August 22, 2006, 1:00am UTC](https://forum.kirupa.com/t/order-by-vchar-with-number-filename/198048/1 "2006-08-22T01:00:45Z")

</div>

Ok, i am trying to “ORDER by” in a MySQL select statement. I would like to load a certain column with numbered filenames(e.g:1.jpg,2.jpg,3.jpg…) but in order.

It is sorting them 1,10,11,11,…2,20,22,23,…3…you get the idea. If this was just a number i would “ORDER BY CONVERT(path, DECIMAL) ASC” my problems away, but i need to do this to a vchar column.

Any ideas?[whisper]bwh2?;)[/whisper]
