----- Forwarded message from Lisa Homstad <[EMAIL PROTECTED]> -----
Delivered-To: [EMAIL PROTECTED]
X-SPF-Guess: pass (seems reasonable for [EMAIL PROTECTED] to mail through
192.188.161.151)
From: "Lisa Homstad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Truncation Issues with SQL Server Insert Statement
Date: Tue, 13 Jul 2004 13:18:43 -0500
Hello,
I have been writing a perl script that takes a row of 43 fields, splits on a tab,
and performs an
execute_array into an SQL Server database, all in a loop. The insert statement
works fine, it doesn't
generate any errors as far as I can tell, and all the data gets inserted into the
database. The only
problem is, a few of the fields are truncated. For example, 641-357-0500 will show
up as '6' in about
3/100 rows. If use a subset of that data, rows with a field that was not truncated
in the original set
may become truncated in the subset. The fields are no more than 20 characters
long. I have done a
trace() in perl and all the variables are being bound with the correct, untruncated
values, and when I
ran a dts with the file through sql server, the data was inserted correctly.
I have tried everything I can think of and searched all over for anyone who has had
a similar problem,
and I can't find anything, so I was hoping that you might have heard of something
like this or know why
it was happening (and I'm really hoping it's not something painfully obvious).
Anything you could tell me would be helpful,
Lisa Homstad
Web Developer
Global Reach Internet Productions
[EMAIL PROTECTED]
515-296-0792
http://www.globalreach.com
----- End forwarded message -----