Re: [sqlite] char to int conversion

2008-09-10 Thread jerry
Dennis, I did not know about cast expression but it looks like a better solution. Thank you for your quick response. Jerry > >> > I have a CHAR field which is usually an integer. I would like to >> sort > this field as if it is an integer so that 1a 5b 10c 12xxx does >> not get > sorted as 10c 1

Re: [sqlite] char to int conversion

2008-09-09 Thread Dennis Cote
jerry wrote: > I have a CHAR field which is usually an integer. I would like to sort > this field as if it is an integer so that 1a 5b 10c 12xxx does not get > sorted as 10c 12xxx 1a 5b. I have successfully used something like > "ORDER BY CHARFIELDNAME - 0" which seems to convert the expressio

[sqlite] char to int conversion

2008-09-09 Thread jerry
I have a CHAR field which is usually an integer. I would like to sort this field as if it is an integer so that 1a 5b 10c 12xxx does not get sorted as 10c 12xxx 1a 5b. I have successfully used something like "ORDER BY CHARFIELDNAME - 0" which seems to convert the expression to an integer the