Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I sort on final digit of a number?
[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
![]() |
![]() |