February 20, 2013 at 4:27 am
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
February 20, 2013 at 7:20 am
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.
February 23, 2013 at 2:33 am
Thanks a lot
It worked
March 3, 2013 at 2:14 am
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
March 4, 2013 at 1:12 am
I used format file and now it is inserting.
bcp DB.dbo.[Table] format nul -T -N -f t_n.fmt
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy