SQL Server Performance

Bulk Insert Error......

Discussion in 'SQL Server DTS-Related Questions' started by krajdba, Nov 3, 2005.

  1. krajdba New Member

    Hi Gurus,


    I used Bulk Insert statement to transfer Flat file data to a Table of the
    Database.I encountered following ......

    BULK INSERT pubs..Subscriber FROM 'c: ransferdata.txt'
    WITH (
    DATAFILETYPE = 'char',
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '
    ',

    )

    Server: Msg 4864, Level 16, State 1, Line 1
    Bulk insert data conversion error (type mismatch) for row 11, column 1 (MSPPID).
    Server: Msg 4863, Level 16, State 1, Line 1
    Bulk insert data conversion error (truncation) for row 149725, column 14 (SubscribersEmailAddress).
    Server: Msg 4863, Level 16, State 1, Line 1
    Bulk insert data conversion error (truncation) for row 149770, column 7 (Country).
    Server: Msg 4863, Level 16, State 1, Line 1
    Bulk insert data conversion error (truncation) for row 149794, column 15 (ShipToPostalCode).

    What is the cause for such an error and How to Fix it.

    Please help very Urgent.



    raj
  2. Luis Martin Moderator

    Check compatibility between columns table and txt fields.


    Luis Martin
    Moderator
    SQL-Server-Performance.com

    One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important
    Bertrand Russell


    All postings are provided “AS IS” with no warranties for accuracy.



  3. krajdba New Member

    Hi Gurus,

    Ok, I fixed the Error for typemismatch.But still I am facing problems with some
    rows.How to treat them as rejected Rows and continue with the transfer.

    currently I am unable to transfer any rows.there is no data transfer.

    can I have links on BULK TRansfer,prefereblely with examples.

    Please help.



    raj
  4. Madhivanan Moderator

    After importing data delete the unwanted rows

    Madhivanan

    Failing to plan is Planning to fail
  5. satya Moderator

    Have a read about BULK INSERT and BCP topics under books online.

    Satya SKJ
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page