I BCP out a table and then import back. While BCP IN, i get the following error: #@ Row 303, Column 5: Invalid character value for cast specification @# #@ Row 296, Column 4: String data, right truncation @#
I think the data you try to insert into the table does not match the the ddl of the table itself. Are there any strange characters on row 303? What does row 303 look like anyway? The bcp-command you execute: does it consider strange characters and how does it map the file to the table? What's the layout of the table?
I don't suspect if there's any column binding problem, coz
I create a txt file from the same table, then truncate that table and import the data back from this text file.
The problem is multiple commas ",,," in the note-content column text.
Here's an example:
CREATE TABLE mydbo (id int, notedate datetime, note_content varchar(900), note_user char(3))
SELECT 1 , '2003-12-24 00:00:00' , 'AS PERINSTRUCTION ENTRD SC#@12/16/03....71', 'SF2'
SELECT 2 , '2004-02-07 00:00:00', 'CHECKED INF SCA@#02/06/04.................17', 'SF2'
SELECT 3 , '2004-03-26 00:00:00', 'GO TO, #, as per data .', 'SF2'
When i BCP out this table and then BCP into same table, i get the error for line 3. (right trucation)
How do i handle this, i have a CSV file that i have to import into a table, but data in single field contains multiple commas.