| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: Ordinal Function
Terry Coccoli <request_at_ifneeded.com> wrote in message news:<gseLc.20093110$Id.3323112_at_news.easynews.com>...
> Has anyone created a user function to return the ordinal position based
> on numeric input?
>
> In other words, f(1) returns 'st', f(2) returns 'nd', f(3) returns
> 'rd', etc.
Check out the format mask of the to_char function in the sql reference manual. Other than that (if the format mask is lacking), visit http://asktom.oracle.com You'll probably find code there.
Sybrand Bakker
Senior Oracle DBA
Received on Wed Jul 21 2004 - 03:56:53 CDT
![]() |
![]() |