I want a function or procedure to spell out an amount of money, as for filling out the amount line on a check or receipt.
That is, I want to enter '12.23' and get back 'Twelve Dollars and Twenty Three Cents'.
Function should work up through the billions of dollars - Microsoft offers VB logic for this as the 'SpellNumber' routine, but I need it as a user defined SQL Server 2000 function.
I have no need to support fractional cents.
Points for either working code or for a pointer to same - I can't believe this is not out there already, but my searches have come back dry.