Home » RDBMS Server » Server Administration » Conversion into special kind of strings
Conversion into special kind of strings [message #371282] Wed, 27 September 2000 15:16 Go to next message
Inigo Aznar
Messages: 1
Registered: September 2000
Junior Member
I am building a communications protocol whereby i get a number from an ORACLE table and i converted into a string with 6 bytes as integers and 3 decimals, so that if the number is 123.34 i need to get 000123.340, i am trying to use something already posted by Sarah: select LPAD(TO_CHAR(0100.23,RTRIM( '999999.'||RPAD( '9',3,'9'),'.')),20,'0') from dual

but i get:
LPAD(TO_CHAR(0100.23
--------------------
00000000____100.230

Where "_____" are spaces!I need the '0' instead of the spaces! I am totally desperate and i need this very urgently. Can anybody help me?

Thanks a lot,
Iņigo.

P.S Please, if you know the answer write back as soon as possible!!!
Re: Conversion into special kind of strings [message #371284 is a reply to message #371282] Thu, 28 September 2000 00:25 Go to previous message
Naseer
Messages: 5
Registered: September 2000
Junior Member
Hello,
try

select to_char(123.99,'000000.000') from dual;

thankx
Previous Topic: call a procedure from a procedure
Next Topic: spooling limitations
Goto Forum:
  


Current Time: Thu Apr 25 22:57:23 CDT 2024