Is there a way to have SQL Server format a number into ordinal form?

No, there is not any built in function that will do this. This is something that should be handled in the presentation layer and not in the data coming from the database.

EDIT: based on the presence of a "crummy presentation layer", IF this would have to be done in the database I suggest creating a UDF to convert the values to ordinal or words. IT definitely would not be pretty.

From a comment: For the second part of the question, Daniel used the script found here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=86067


With regards to the second part of the request -- turning numbers into words -- there is a function, Util_ToWords available in the Free version of the SQL# SQLCLR library (which I am the author of, and again, this function is in the Free version) that does just this:

SELECT SQL#.Util_ToWords(72451);
-- Seventy Two Thousand, Four Hundred Fifty One

SELECT SQL#.Util_ToWords(72451.56);
-- Seventy Two Thousand, Four Hundred Fifty One and 56

The Util_ToWords function was originally intended to mimic a similar function available in Crystal Reports that helps with printing checks (in the US, at least).

Please note that the wording:

  • is currently only in English, and

  • uses the "short scale" names for values starting in the Millions. For more info on "short scale" and "long scale" names, please see:

    • Names of large numbers
    • Long and short scales