decimals and oracle

N

Nicolas Cage

sometimes from a query of oracle i get an excel report with funny numbers
in text format like "100.000,00" instead of "100.000,00"

Oracle admin says Oracle spoil many times the data and i need to correct it
by code
Any idea?

Tia
 
J

Joel

Sub test()

MyNumber = "100.000,00"
location_period = InStr(MyNumber, ".")
location_comma = InStr(MyNumber, ",")
If location_comma > location_period Then
MyNumber = Replace(MyNumber, ".", ";")
MyNumber = Replace(MyNumber, ",", ".")
MyNumber = Replace(MyNumber, ";", ",")

End If


End Sub
 
N

Nicolas Cage

Joel said:
Sub test()

MyNumber = "100.000,00"
location_period = InStr(MyNumber, ".")
location_comma = InStr(MyNumber, ",")
If location_comma > location_period Then
MyNumber = Replace(MyNumber, ".", ";")
MyNumber = Replace(MyNumber, ",", ".")
MyNumber = Replace(MyNumber, ";", ",")

End If
Not correct, if number is "100,000,00" ?
 
J

Joel

The new code will work under ANY case. I originally solved the problem as
you posted it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top