-- 
-- This only works under Oracle and has the limitation of 1 to 3999


SQL> SELECT to_char(1666, 'RN') urcoman, to_char(1666, 'rn') lcroman FROM dual;

URCOMAN         LCROMAN
--------------- ---------------
        MDCLXVI         mdclxvi