PC Review


Reply
Thread Tools Rate Thread

decimals and oracle

 
 
Nicolas Cage
Guest
Posts: n/a
 
      29th Feb 2008
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


 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      29th Feb 2008
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


"Nicolas Cage" wrote:

> 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
>
>
>

 
Reply With Quote
 
Nicolas Cage
Guest
Posts: n/a
 
      1st Mar 2008

"Joel" <(E-Mail Removed)> ha scritto nel messaggio
news:5CE7A700-3F94-4BFF-9493-(E-Mail Removed)...
> 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" ?


 
Reply With Quote
 
Joel
Guest
Posts: n/a
 
      1st Mar 2008
The new code will work under ANY case. I originally solved the problem as
you posted it.

"Nicolas Cage" wrote:

>
> "Joel" <(E-Mail Removed)> ha scritto nel messaggio
> news:5CE7A700-3F94-4BFF-9493-(E-Mail Removed)...
> > 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" ?
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count digits before decimals and after decimals Elton Law Microsoft Excel Worksheet Functions 4 28th May 2010 01:42 AM
Numeric formatting: decimals and no decimals =?Utf-8?B?cHBzYQ==?= Microsoft Excel Programming 4 14th Jul 2007 09:16 AM
Sequence.nextval numeric type in Oracle 10g differs from Oracle 8i when using MS OleDb provider alasdair.johnson@gmail.com Microsoft ASP .NET 0 27th Apr 2007 05:57 PM
Currency Data Type 2 decimals - actual value shows 4 decimals =?Utf-8?B?VGhvbWFzY2w=?= Microsoft Access 5 24th Mar 2006 04:01 PM
How to connect oracle 8i when oracle 8i and oracle 9i installed in one system Prasad Microsoft ADO .NET 0 1st Dec 2003 10:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:31 PM.