Order by str to int

Order by str to int

am 13.05.2006 01:42:37 von Alex C

Hi jave a database and I want to oder my result by a colum containing
string bit order them like they where int

ex Select * form members order by level

level is string containing data like '12'

I want to oder like the level is Int 12 and not string '12'

Thanks

Re: Order by str to int

am 13.05.2006 02:03:49 von Bill Karwin

Alex C wrote:
> I want to oder like the level is Int 12 and not string '12'

Try using: ORDER BY level+0

That should force it to be interpreted in an integer context.

Regards,
Bill K.

Re: Order by str to int

am 13.05.2006 02:46:02 von Alex C

Thanks

Working like a charm