|
|
|
|
|
|
| Author |
Message |
Günther De Vogelaere *nix forums beginner
Joined: 09 Jan 2006
Posts: 2
|
Posted: Mon Jan 09, 2006 1:03 pm Post subject:
to_char (33, '0009') adds an extra white space
|
|
|
Hi,
When I execute 'select '*' || to_char(33,'0009') || '*' from dual
I get '* 0033*' instead of '*0033*'.
Does anybody know what might be wrong? Something wrong in my configuration? |
|
| Back to top |
|
 |
sybrandb@yahoo.com *nix forums Guru
Joined: 30 May 2005
Posts: 482
|
Posted: Mon Jan 09, 2006 1:44 pm Post subject:
Re: to_char (33, '0009') adds an extra white space
|
|
|
Nothing wrong. Oracle adds automatically a '-' for negative numbers and
a ' ' for positive numbers.
(As documented).
If you don't want that prefix the format with 'fm', so
to_char(33,'fm0009')
--
Sybrand Bakker
Senior Oracle DBA |
|
| Back to top |
|
 |
Günther De Vogelaere *nix forums beginner
Joined: 09 Jan 2006
Posts: 2
|
Posted: Mon Jan 09, 2006 2:17 pm Post subject:
Re: to_char (33, '0009') adds an extra white space
|
|
|
<sybrandb@yahoo.com> schreef in bericht
news:1136814278.434529.146080@g14g2000cwa.googlegroups.com...
| Quote: | Nothing wrong. Oracle adds automatically a '-' for negative numbers and
a ' ' for positive numbers.
(As documented).
If you don't want that prefix the format with 'fm', so
to_char(33,'fm0009')
--
Sybrand Bakker
Senior Oracle DBA
|
Thx :)
Most examples on the web don't even mention the 'fm'.
The strangest thing is, my code (PL/SQL) previously worked flawless without
the 'fm' :s |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Tue Jan 06, 2009 8:53 am | All times are GMT
|
|
Bankruptcy | Air Jordans | Loans | Credit Counseling | Glitter Graphics
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|