Imrort export wizard

  • Hi,

    I am converting data from excel sheet to exixting table with diff datatypes in sqlserver but that throws an error of conversion so plz help me

  • Are all values in the Excel sheet compatible with the corresponding datatypes of the columns in wich they are to be loaded?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Create a copy of the table as a teest-table. Use the import/export wizard multiple times to load the data of the Excel sheet one column at the time. This will eventually point you to the column in Excel that has an incompatible value.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • No in excel sheet all are varchar but in table some are datetime and int and some are varchar

  • karunakar2351 (9/6/2013)


    No in excel sheet all are varchar but in table some are datetime and int and some are varchar

    Note that varchar values in Excel *could* be compatible with the INT and/or DATETIME datatype. You need to look at the actual values in each column in the Excel sheet. If all the values in a column are numeric that row can be imported into a DECIMAL (and maybe INT) column of a table. But if one or more values contain character(s), it will throw a conversion error. The same for the datetime values. If all values in a column in Excel can be converted to proper dates, it can be imported in a datetime column of a table. But if one or more values are not proper date values (sample: 2013-02-30) it will throw a conversion error.

    So all depends on the actual values in the Excel sheet and not the datatype of the Excel sheet columns.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

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

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