Re: Function needed

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 27 Mar 1999 01:17:11 GMT
Message-ID: <36fd3014.2159114_at_192.86.155.100>


A copy of this was sent to jmodic_at_src.si (Jurij Modic) (if that email address didn't require changing) On Fri, 26 Mar 1999 22:29:19 GMT, you wrote:

>On Fri, 26 Mar 1999 11:53:53 +0000, Charles Jardine <cj10_at_cam.ac.uk>
>wrote:
[snip]

>Beware hovewer, this 'JSP' (Julian SPelled) conversion alghorytm has
>some bugs, at least in 7.3.2 (I'm not sure if it was corrected in
>later releases). It incorectly spells a whole ranges of numbers. For
>example, any numbers in the ranges of N00001 .. N00999 or in the
>ranges of NM0001 .. NM0999 (where N is any number from 1 to 9 and M is
>any number from 2 to 9 will be spelled incorrectly.
>
>An example:
>
>SCOTT_at_PO73> select to_char(to_date('100211', 'J'), 'JSP') from dual;
>
>TO_CHAR(TO_DATE('100211',
>-------------------------
>ONE HUNDRED THOUSAND TWO
>
>So I wouldn't use this technique for let say printing cheques with
>spelled amount of money ;-)
>

hmm, interesting, didn't see that one:

Connected to:
Oracle7 Server Release 7.3.4.0.1 - Production With the distributed, replication, parallel query and Spatial Data options PL/SQL Release 2.3.4.0.0 - Production

SQL> select to_char(to_date('100211', 'J'), 'JSP') from dual;

TO_CHAR(TO_DATE('100211','J'),'JSP')



ONE HUNDRED THOUSAND TWO HUNDRED ELEVEN Connected to:
Oracle7 Server Release 7.1.6.2.0 - Production Release With the distributed, replication and parallel query options PL/SQL Release 2.1.6.2.0 - Production

SQL> select to_char(to_date('100211', 'J'), 'JSP') from dual;

TO_CHAR(TO_DATE('100211','J'),'JSP')



ONE HUNDRED THOUSAND TWO HUNDRED ELEVEN SQL> i found the bug, it affected 7.2 -> 7.3.2. fixed in 7.3.3 on up.

>>--
>>Charles Jardine - Computing Service, University of Cambridge
>>cj10_at_cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679
>
>HTH,
>Jurij Modic <jmodic_at_src.si>
>Certified Oracle7 DBA (OCP)
>================================================
>The above opinions are mine and do not represent
>any official standpoints of my employer
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Sat Mar 27 1999 - 02:17:11 CET

Original text of this message