Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How do I sort on final digit of a number?

Re: How do I sort on final digit of a number?

From: Wayne Menzie <waynem_at_bosmedtechdotcom.nospam>
Date: Wed, 19 Jan 2000 23:52:17 GMT
Message-ID: <8EC0BA939wayneshammalammading@129.250.35.141>


[posted and mailed]

postmaster_at_sybrandb.nospam.demon.nl (Sybrand Bakker) wrote in <948320214.17011.0.pluto.d4ee154e_at_news.demon.nl>:

>order by substr(to_char(test_id), length(to_char(test_id)))

Thank you Sybrand. That does the sort on the last number perfectly.

I had a suggestion to use the following:

   ORDER BY MOD(Test_id, 10)

Would this be a more efficient means of doing this? Both seem to work properly.

Wayne Menzie Received on Wed Jan 19 2000 - 17:52:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US