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: Buck Turgidson <jcmanNOSPAM_at_worldnet.att.net>
Date: Wed, 19 Jan 2000 21:11:34 -0500
Message-ID: <865r5r$cov$1@bgtnsc01.worldnet.att.net>


Either way, you won't use an index, so I don't think efficiency is an issue, unless your CPU is an 8088, and has trouble doing the function.

Wayne Menzie <waynem_at_bosmedtechdotcom.nospam> wrote in message news:8EC0BA939wayneshammalammading_at_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 - 20:11:34 CST

Original text of this message

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