Home » SQL & PL/SQL » SQL & PL/SQL » sql/plsql
icon7.gif  sql/plsql [message #185300] Tue, 01 August 2006 02:16 Go to next message
tnagireddy
Messages: 5
Registered: July 2006
Location: hyderabad
Junior Member

I need to preparing one report in Sql*plus.

Is there any way to display the currency sign in SQL*plus

USD - $
GBP -
Eur -
Yen -
Re: sql/plsql [message #185305 is a reply to message #185300] Tue, 01 August 2006 02:29 Go to previous messageGo to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
i think oracle supports only $ and pound..but not sure
Re: sql/plsql [message #185307 is a reply to message #185305] Tue, 01 August 2006 02:45 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SELECT chr(128) euro, chr(36) dollar, chr(163) gbp, chr(1200) yen
FROM dual;

I guess it depends on your character set; EUR, USD and GBP work for me, but can't display YEN (it is CHR(4B0/hex) or 1200/dec).

[Updated on: Tue, 01 August 2006 02:46]

Report message to a moderator

Re: sql/plsql [message #185527 is a reply to message #185307] Wed, 02 August 2006 02:59 Go to previous messageGo to next message
sanjit
Messages: 65
Registered: November 2001
Member
Would you been able to tell me what is meant by character set??

Is there is something we need to setup somewhere in oracle??
My query return these values...


euro	dollar	gbp	yen
	$			

Re: sql/plsql [message #185528 is a reply to message #185527] Wed, 02 August 2006 03:02 Go to previous messageGo to next message
sanjit
Messages: 65
Registered: November 2001
Member
i checked parameter

select * from nls_database_parameters;
NLS_CHARACTERSET UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_NCHAR_CONV_EXCP FALSE
NLS_SAVED_NCHAR_CS US7ASCII
Re: sql/plsql [message #185559 is a reply to message #185528] Wed, 02 August 2006 06:02 Go to previous messageGo to next message
shrichandray
Messages: 2
Registered: August 2006
Location: BANGALORE
Junior Member
I think You need not the messup with DBA level to set the charector set.

Why don't you try concat or some fixedcode lookup table.use decode or joining, to get the desired result.


Fixedcode look table mean you create two or three coloum and put the mapping values,

Let me try to show your required details by simple concat.

SQL> spool Sri
SQL> select
'$'||1200 USD,
''||1200 GBP,
''||1200 Euro,
''||1300 Yen from dual
/

SD GBP EURO YEN
---- ------ ------- ------
1200 1200 1200 1300

SQL> spool off
SQL> host

*** In the SQL Window you may not see EURO () Symbol but don't
worry when you copy paste or open it in notepad or any pad you will get your desire value.
Re: sql/plsql [message #207699 is a reply to message #185300] Wed, 06 December 2006 12:20 Go to previous message
Safeeq.S
Messages: 100
Registered: October 2005
Location: Bangalore
Senior Member

Hi,

I am not sure if i can post my question here or not. I am also facing a similar problem of euro sign not getting printed properly.

select
'$'||1200 USD,
''||1200 GBP,
''||1200 euro,
''||1300 Yen from dual

All the currencies are getting printed proprely ,except euro().

Can any one help me,please
Previous Topic: how to return all records i updated today?
Next Topic: urgent help needed in the query
Goto Forum:
  


Current Time: Sun Dec 04 10:15:39 CST 2016

Total time taken to generate the page: 0.04694 seconds