Error while importing excel data into sql server 2005

  • Hi,

    Im importing an excel file into sql server 2005 using import/export wizard. In excel in one column, i have numeric as well as text data. The column property is set as text. Now while importing the sql column data type for that excel column is set to nvarchar. But after the import i see null values in place of text data in that column. i can see numeric values.

    Can anyone tell me what might be the problem ?

    Thanks,

    Nikhil

  • Nikhil

    The problem you have "is by design" when there are are a mixture of numeric and text in

    a column. This problem has been on the agenda many times in this forum.

    My recommendation is to save the Excelfile as a tab separeted textfile and import that file

    instead.

    //Gosta

  • Hey thanks for your prompt reply Gosta.

    I have also tried saving excel file as tab delimited text file. But while importing that file im getting the following error -

    Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column XXX returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

    Can you please help ?

    Thanks,

    Nikhil

  • nvarchar number of characters ok?

    Look in the textfile with an editor to see if there are any strange signs.

    SSIS text import should work without problems but I don't use it as

    I prefere bulkinsert.

    /Gosta

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply