Home » SQL & PL/SQL » Client Tools » temperature symbol required (oracle 10g, window Xp)
temperature symbol required [message #555286] Wed, 23 May 2012 00:22 Go to next message
myclassic
Messages: 127
Registered: December 2006
Location: Pakistan
Senior Member
I need to print temperature along with its symbol.
how it is possible in oracle reports?
for example 45 (degree centigrade in symbol format.)
Re: temperature symbol required [message #555290 is a reply to message #555286] Wed, 23 May 2012 00:50 Go to previous messageGo to next message
Littlefoot
Messages: 21331
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Find its ASCII code and display it as (for example 25 degrees)
SQL> select '25' || CHR(176) twenty_five_degrees from dual;

TWE
---
25°

SQL>
Re: temperature symbol required [message #555291 is a reply to message #555290] Wed, 23 May 2012 01:06 Go to previous messageGo to next message
myclassic
Messages: 127
Registered: December 2006
Location: Pakistan
Senior Member
thanks a lot dear.
you are always a great help.
Re: temperature symbol required [message #555293 is a reply to message #555291] Wed, 23 May 2012 01:10 Go to previous messageGo to next message
Michel Cadot
Messages: 65317
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Take care that this character may not have 176 as code point in your character set.
Check using:
select ascii('°') from dual;

Regards
Michel
Re: temperature symbol required [message #555297 is a reply to message #555293] Wed, 23 May 2012 01:27 Go to previous messageGo to next message
Littlefoot
Messages: 21331
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's why I said "find its ASCII code and ...".
Re: temperature symbol required [message #555298 is a reply to message #555297] Wed, 23 May 2012 01:29 Go to previous message
Michel Cadot
Messages: 65317
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, I understood but I'm not sure OP actually understood and did not directly take our 176.

Regards
Michel
Previous Topic: SQL for saving the query result in a txt file (2 Merged)
Next Topic: inserting a data with substitutuion variable
Goto Forum:
  


Current Time: Fri Jan 19 23:52:57 CST 2018

Total time taken to generate the page: 0.01406 seconds