Converting Roman Numerals: More TSQL Program Chrestomathy.

Comments 0

Share to social media

As part of my series on TSQL Program Chrestomathy, this is a couple of TSQL routines that convert between integers and roman numerals.  There are two functions, one for each direction of conversion. These are a slight revision and expansion of what I published on a blog in 2011. I’ve added a bit more of the original test suite The problem with Roman Numerals is that there is no ANSI Standard for them. Originally, it was a simple tally system which grew rather organically, and was still being developed up to the time (14th Century) that we sighed and adopted hindu-arabic numerals. Even after that point, they were being used for timber construction until the eighteenth century because the marks were easy to make with a chisel. Nowadays, they are used occasionally for floor numbering, in books and documents for paragraph numbering, in some countries for denoting the day of the week, for clock-faces,  and  The subtractive notation was a late arrival, though that and the double-subtractive were used in Roman times. To get some decent-sized numbers, I use the system based on Etruscan usage for large numbers, though I agree that it all goes a bit nebulous after 200000.

Load comments

About the author

Phil Factor

See Profile

Phil Factor (real name withheld to protect the guilty), aka Database Mole, has 40 years of experience with database-intensive applications. Despite having once been shouted at by a furious Bill Gates at an exhibition in the early 1980s, he has remained resolutely anonymous throughout his career. See also :

Phil Factor's contributions