In message <[EMAIL PROTECTED]>, edgardo
catorce <[EMAIL PROTECTED]> writes
>Good day!
>
>I have a problem... I want to sort and print records..
>say for example...
>
>1-3
>1-10
>1-11
>1-12
>1-1
>1-2
>
>the output should be...
> 
>1-1
>1-2
>1-3
>1-10
>1-11
>1-12
>
>when i sorted it by ascending order.. the output is:
>
>1-10
>1-11
>1-12
>1-1
>1-2
>1-3
>
>Please help me. Thank you...

Please explain how the data is stored, and assuming it is in a database,
what sort of database.

The problem is that the data is being treated as a string, and you want
it to be treated as a number.

If this is one field, then you might need to split it, using substring.
The second part of the string could be turned into a number, using cast.

It would be better if you could put the data in two fields, each
numeric, then your sort would be quicker.  I always try to get any
"complicated" bits, like splitting or combining, into the INSERT side,
so that when the user is retrieving data, it is quicker.

-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

Reply via email to