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: chiang.tan AT truenergy.com.au
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield
  • Date: Wed, 26 Jul 2006 12:13:07 +1000

Bill,
Thanks for the info. I've found out the caused of syntax error. I was
trying to extract data out from Oracle and bcp into MSSQL.

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.

Thanks for your help again.

Cheers,
Chiang Tan



"Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
Sent by: freetds-bounces AT lists.ibiblio.org
25/07/2006 06:16 PM
Please respond to
FreeTDS Development Group <freetds AT lists.ibiblio.org>


To
"FreeTDS Development Group" <freetds AT lists.ibiblio.org>
cc

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






Hi Chiang,

I don't think that we have much (if any) experience with Sybase::BCP,
although any faults should be fairly easy to diagnose.

What we would need to help solve the problem is a freetds log dump.
This produces a low level trace of the freetds activity that is going on
under the covers.

to get a log dump, you need to:

a) set the environment variable TDSDUMP to a filename. for example:
setenv TDSDUMP mytdsdump.txt (csh) or:
export TDSDUMP=mytdsdump.txt (ksh) or:
TDSDUMP=mytdsdump.txt; export TDSDUMP (sh)

b) run the process that is causing the problem

c) send us the dump file for us to have a look at.

If you can create a small input file that reproduces the problem, along
with the definition of the table you are trying to bcp into, that would
also help.

Given the error message the most likely cause is a data/column type
mismatch. For example, trying to put non-numeric data into a numeric
column. Another possible cause would be a date format that freetds is
unable to convert to an internal date representation.

Hope this helps,

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
chiang.tan AT truenergy.com.au
Sent: 25 July 2006 07:35
To: freetds AT lists.ibiblio.org
Subject: [freetds] Attempt to convert data stopped by syntax error in
sourcefield


Hi,
I'm trying to use Sybase::BCP with freeTDS 0.63 to bcp to MS SQL 2000,
and
it kept on coming back with
"Attempt to convert data stopped by syntax error in source
field"

However, I have no problem using the same script (with Sybase client) to

bcp to Sybase database.

Does anyone know what causes the syntax error when BCP-ing?

Cheers,
Chiang Tan


--
We're excited by gas & electricity.NOTICEThis email and any files transmitted
with it may be confidential and are intended solely for the use of the
individual or entity to whom they are addressed. Any confidentiality is not
waived or lost because this email has been sent to you by mistake. This email
may contain personal information of individuals, and be subject to
Commonwealth and/or State privacy laws in Australia.This email is also
subject to copyright. If you are not the intended recipient, you must not
read, print, store, copy, forward or use this email for any reason, in
accordance with privacy and copyright laws. If you have received this email
in error, please notify the sender by return email, and delete this email
from your inbox.The recipient should check this email and any attachments for
the presence of viruses. We do not accept liability for any computer virus,
data corruption, delay, interruption, unauthorized access or unauthorised
amendment.TRUenergy Austra
lia Pty Ltd ABN 96 071 611 017

Message protected by MailGuard: e-mail anti-virus, anti-spam and content
filtering.
http://www.mailguard.com.au/mg






Archive powered by MHonArc 2.6.24.

Top of Page