Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 BCP in fails

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-06-04 : 14:26:39
Uday writes "Hi,

I am using BCP command for import and export of data from one db to another.

Environment used

SQL server: 7 for exporting , 2000 for importing

os:Win2k(for both db's but different servers)

db one SQL sever 7 and One sql server 2000

Table structure is same for both DB's.

Here in above environment the BCP out command works fine with SQL server 7 db and exports the data from a table having a column with timestamp datattype to a text file.

But the same exported file when used for BCP in with SQL server 2000 db then the command fails and gives error.

Following Error occurs,

Starting copy...
SQLState = 22001, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation

BCP copy in failed


Can u help me all on this to find the workaround on the same.

Thanks in advance.

Uday"

X002548
Not Just a Number

15586 Posts

Posted - 2004-06-07 : 13:56:17
can you shows us the bcp commands and the DDL for both tables?



Brett

8-)
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-06-07 : 14:02:30
Create a view on the source and destination tables omitting the timestamp column and use the views for the bcp's.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -