Results 1 to 6 of 6

Thread: Bulk Insert

  1. #1
    Join Date
    Jun 2004
    Posts
    19

    Unanswered: Bulk Insert

    Hi,

    I am trying to do the data transfer using BULK INSERT from a dat file. And the data is only one row .
    The bulk insert is giving me the error
    "Bulk insert data conversion error (truncation) for row 1, column 11 (extension1)"
    The line given below is that data as it appear in the dat file.

    '20030715','Logiciel','Taching, Inc.','108 Pierson Ave',,'Edison','NJ','08837','USA','732-603-7877',,,,,,,,,,,,,,,,,,,,'N','N','N','N','N','N',, ,2003/jul/15 11:09:33.718000,,,,


    And that column 11(name of that column is extension1) has no data and the datatype in SQL server for that column is varchar(1).

    I am not able to figure out why this error. Can anyone help.

    Regards

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Show us the BULK INSERT statement you're running...

    Edison huh.....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jun 2004
    Posts
    19
    Hi,
    The below is the bulk insert statement I am using.
    BULK INSERT vendor FROM 'c:\reload\182.dat'
    WITH (

    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    for kicks...dts it in to a staging table...let dts create it, and see what it does....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Did you create the source file yourself or it's a result of some other system uptputting it? I imported it using DTS, but the single quotes are messing me up when using BCP. Of course I can do an update after it, but that's a workaround. Any chance you can use a pipe for field delimiter (comma is very common for a field value) and loose the single quotes?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  6. #6
    Join Date
    Jun 2004
    Posts
    19
    Thanks,
    will try and see

Posting Permissions

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