03 February 2014

Converting Roman Numerals: More TSQL Program Chrestomathy.

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.

Keep up to date with Simple-Talk

For more articles like this delivered fortnightly, sign up to the Simple-Talk newsletter

This post has been viewed 7265 times – thanks for reading.

  • Rate
    [Total: 0    Average: 0/5]
  • Share

Phil Factor

Google + To translate this article...

View all articles by Phil Factor

Related articles

Also in Blogs

Ten Years Later

It’s hard to believe, but Simple Talk has now been going for over ten years. Thanks to brilliant pieces from our writers, hard work from the team here, and countless valuable contributions from you, our readers, we’re currently receiving one million page views a month, and sitting on a hefty 2,500 articles from over 370 … Read more

Join Simple Talk

Join over 200,000 Microsoft professionals, and get full, free access to technical articles, our twice-monthly Simple Talk newsletter, and free SQL tools.

Sign up