Re: Currency sign ($) in SQL*Plus

From: Philip Chee <philip_at_aleytys.pc.my>
Date: 1995/05/25
Message-ID: <801370611.803snx_at_aleytys.pc.my>#1/1


In article <3pvn4c$rv1_at_news.tamu.edu> m0v5533_at_tam2000.tamu.edu writes:
>
>>When formatting a COLUMN statement (In SQL*Plus), I use the "$" sign to
>>indicate a currency column, and it is pre-pended to the returned column.
>>A client requires Japanese currency output and I tried to format the
>>column with the Yen sign (ASCII 157) it didn't work.
>>Is the format character dependant on the NLS setting? What symbol is
>>used in Japan, UK, etc.
 

>Oracle has a predefined function called chr(number) . In your case what
>you would have to do is the following
>select chr(157)||yen from foo;
>chr(157) will convert the ascii to number and you will get yen.

SQL*Plus: Release 3.1.2.2.1 - Production on Thu May 25 10:36:48 1995

Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.

Connected to:
ORACLE7 Server Release 7.0.13.1.0 - Production With the procedural option
PL/SQL Release 2.0.15.1.0 - Production

SQL> select chr(157) from dual;

C
-
 <-------- doesn't seem to work here????

1 row selected.

+---------------------------------+-------------------------------------------+
|Philip Chee: philip_at_aleytys.pc.my| This is a work of fiction.Any resemblance |
|Tasek Cement Berhad              |  to persons living or dead is completely  |
|P.O.Box 254, 30908 Ipoh, MALAYSIA| coincidental. The creator of this article |
|Voice: +605-551-011              |    has asserted its moral right to be     |
|  Fax: +605-566-142              |          identified as the author.        |
+-------------------Eigi-Eru-Enn-Allir-Jomsvikingar-Daudir!-------------------+
... Please type your Bank PIN number in your reply again.
---
 * TLX v4.00 *
Received on Thu May 25 1995 - 00:00:00 CEST

Original text of this message