Re: Ordinal Function
From: <sybrandb_at_yahoo.com>
Date: 21 Jul 2004 01:56:53 -0700
Message-ID: <a1d154f4.0407210056.60d5040c_at_posting.google.com>
Date: 21 Jul 2004 01:56:53 -0700
Message-ID: <a1d154f4.0407210056.60d5040c_at_posting.google.com>
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 - 10:56:53 CEST