Skip to Content.
Sympa Menu

freetds - Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield
  • Date: Sat, 29 Jul 2006 11:57:20 -0400

chiang.tan AT truenergy.com.au wrote:
>
> The exaction of Oracle came back with numbers like .0123 (for number
> 0.0123), and BCP is not happy with this format. What I need to do right
> now is to fix this problem then BCP should work again

I just spent an hour looking into this. What happens with ".0123" depends
on the datatype of the column being loaded. For REAL/FLOAT, the string is
processed in tds_convert_char() by atof(3), which I would think would not
require a leading '0' (and shouldn't), but still might. For other
datatypes, we of course have our own algorithms.

Could you tell me what the column's datatype is? If it's REAL or FLOAT,
I'd like to know what OS (and what version); if Linux, what version of
libc you have. (I doubt the problem is there, but it's best to have all
the facts.)

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page