|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 6:07 AM
Points: 85,
Visits: 973
|
|
Hi
I want to test some changes in the structure of a table and see the plan,I exported the data in a text file using bulk copy,the table is about 400G and 120000000 records.
bcp DB.dbo.[Table] out "G:\sqlscript.txt" -c -T
after that I create the table in another test server ,using the primary structure of the table from Main server and the same collation
I imported the data in new table with this command
bcp Test.dbo.[Table2] in "G:\sqlscript.txt" -c -T -e G:\error.txt
but from 120000000 records ,it inserted just 1000000 records and in command prompt I have :
sqlstate =22005 , nativeerror=0 error = [microsoft][sql server native client 10.0]invalid character value for cast specification
and in error.txt file :
#@ Row 951577, Column 8: Invalid character value for cast specification @#
please help me
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 11:56 AM
Points: 1,315,
Visits: 2,885
|
|
I would use -N option (native mode) for what you are doing instead of -c
The probability of survival is inversely proportional to the angle of arrival.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 6:07 AM
Points: 85,
Visits: 973
|
|
Thanks a lot It worked
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 6:07 AM
Points: 85,
Visits: 973
|
|
A gain I have problem with bcp in.It worked for that table but when I want to try it for another table I got this error in error file:
#@ Row 52, Column 2: String data, right truncation @#
This column is varchar,I checked the previous table and it dosen't contain any varchar column.how can I solve this ? It took me a lot of time to export the data
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 6:07 AM
Points: 85,
Visits: 973
|
|
I used format file and now it is inserting.
bcp DB.dbo.[Table] format nul -T -N -f t_n.fmt
|
|
|
|