I am reading data from excel sheet and inserting in to temp table something like this
SELECT * into Temp_table
'SELECT * FROM [Sheet1$]')
In this,we have particular column "Obejct ID".
In Object ID column starting few rows will have integer data(example-100,200 and 300) and few rows will have alphanumeric data (5000-55526-6563).
when temp table is created this column Object ID would have created with data type INT.
so when it tries to insert alphanumeric data for the upcoming rows it will throw error data type mismatch.
How can i overcome this problem?
Please Note:Since we want to make this extraction and loading dynamic,data type might change from excel to excel and table should be created based on the data type we have in excel everytime.