var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Order varchars like number
I have a table that contains documents, each documen have a ID.
This ID is like this: 1.1, 1.2, 1.3.1, and so ...
But, if i make a query and i say that query must be ordered by ID,
it give a result like this:
If I add a zero, the result is in order:
But, the question is:
Is there another way to sort this varchar ID correctly without adding a zero to it ?
Re: Order varchars like number
Order By replace(id,'.','')
should ids place this order
What about this?
order by cast(field as numeric)
You need to add the zero. Write a function that will do it for you, and then you can reference it easily in queries.