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: "Lowden, James K" <james.k.lowden AT alliancebernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield
  • Date: Mon, 31 Jul 2006 11:18:50 -0400

> From: chiang.tan AT truenergy.com.au
> Sent: Sunday, July 30, 2006 7:38 PM
>
> What I did was using DBD::Oracle to extract the data out from Oracle
> 8 tables [Field Datatype: Number (15,5)]
>
> Then use Sybase::BCP (Sypperl) to import that data into MSSQL 2000.
> [Field Datatype: [numeric (15, 5)]
>
> I ran the script on Sun Solaris 2.8, using Perl 5.8.7, Sybperl
> 2.18, DBD::Oracle 1.17 and freeTDS 0.63
>
> What I did to overcome this problem was, I did a TO_CHAR on oracle
> while extracting the data (since perl has no datatype), to force
> a leading zero.
>
> I hope the information helps.

Thanks, Chiang. It helps.

I checked over the code in CVS HEAD and modified two unit tests
(src/tds/unittests/convert.c and src/dblib/unittests/bcp.c) to use
".1234" as source character data with a numeric destination type. I ran
these on my i386 box. I also tried freebcp. All worked.

I think the problem arises with Sybase::BCP. It could well be something
on the FreeTDS end, but I'm not going to try to track it down, because
the combination is infrequently used and the bug is minor. If someone
wants to look into it further (and possibly send a patch) at least they
have enough information to do so.

Regards,

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.




Archive powered by MHonArc 2.6.24.

Top of Page