Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Location
    Far away from heaven
    Posts
    194

    Unanswered: BCP import error

    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 @#

    Help plz!

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    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?

  3. #3
    Join Date
    Jun 2004
    Location
    Far away from heaven
    Posts
    194
    Hi, thanx.
    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))
    go
    INSERT MYTAB
    SELECT 1 , '2003-12-24 00:00:00' , 'AS PERINSTRUCTION ENTRD SC#@12/16/03....71', 'SF2'
    UNION ALL
    SELECT 2 , '2004-02-07 00:00:00', 'CHECKED INF SCA@#02/06/04.................17', 'SF2'
    UNION ALL
    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.


    Howdy!

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    Would it be possible for you to choose a different field seperator such as ; or [tab] ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •