Issue on importing data from Excel 2010 to SQL Server 2008R2

  • Hi all,

    I am trying to import data from excel to my sql table. For some columns in database i used varchar as datatype but it gave some error so converted it to nvarchar and then it started working fine. But still for one column which has datatype numeric in database it is not working.

    I am getting following error

    "The OLEDB provider used by OLEDB adapter cannot convert between types DT_DATE and DT_NUMERIC for 'columnname' ".

    Note i have tried changing the db column datatype to float and nvarchar from numeric but still its giving the same error. Please let me know if anybody has solution for it. Its very urgent.

    Thanks

    Abhishek

  • Its seems from your statement that there is some problem with columns mapping. Can you share some portion of your excel (if possible) so that I can see why you are getting the error.

    __________________________________________
    ---------------------------------------------------
    Save our mother Earth. Go Green !!!

  • Well, apparently your are trying to insert dates into a numeric column.

    That won't work of course. Are you sure the source column data is meant to be put into a numeric column?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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