Re: On to Bulk Insert issues



panic attack (tunc.ovacik@xxxxxxxxx) writes:
it is a chance for me that such a topic has been opened :))
so i can ask something that i need to know...

well i am using BCP command to get a text file into SQL Server 2000
but i am getting an error message like this one :
"string data, right truncation"

and i have no idea how i am going to get over this problem!!
in what situations does the sql server 2000 return with such an error?

what should i do to get over this problem?

First start a new thread, so we can keep different problems apart.

You can try the -e option to get errors to a file, you will then see which
records in the file that provokes this error. I need however add the caveat
that not all errors get listed in the error file, and I don't remember if
this error gets lists.

The two most plausible reasons for the error is
1) the file has data that does not fit the table columns.
2) there is an error with your delimiters, so that BCP gets out of sync.

If that does not help, post the CREATE TABLE command for the table and the
exact command line for BCP you are using. If you use a format file, please
also include a format file. Finally, include a sample of the input file.
Best is if the sample produces the error message. If the input file
exceeds 80 characters in length include it as an attachment, so it does
not get wrecked in news transport.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: On to Bulk Insert issues
    ... in what situations does the sql server 2000 return with such an error? ... there is an error with your delimiters, so that BCP gets out of sync. ... post the CREATE TABLE command for the table and the ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: BCP format file
    ... There is no way you can do this with BCP, ... use the bulk copy API and bulk from variables. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • FYI: Delete still shows the deleted record
    ... "kit" wrote: ... new SQL Server DB and I'm borrowing code from the previous SQL Server DB ... Put this in the click event of your "DELETE" command button: ... Public Sub DelCurrentRec ...
    (microsoft.public.access.forms)
  • Re: ISQL is truncating contents of text field sent to text file.
    ... At first we were inserting each FOR XML to a table ... to find a single solution compatible with SQL Server 2k & 2k5. ... After asking on usenet, and being suggested to use BCP, we now ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Arbitrary Command Execution on Distributor SQL Server 2000 machines (#NISR22002002A)
    ... Arbitrary Command Execution on SQL Server 2000 ... Category: Arbitrary Command Execution ...
    (Bugtraq)