I'm trying to upload Excel (2003) file into Sql server 2005.
At present we are using SSIS to upload the file into a Temporary table (with defined schema) and then moving the data to their intended location using Stored procedure. This gives lots of errors due to datatype mismatch and sometimes null values are uploaded into table even though the excel file contains values.
Now I have the following options
Option 1 : (Suggested here)
Import the data into a table with all columns of Type varchar(255). Then have an SP validate the datatype of each column before moving it to live... Here again will it be a performance problem to use IsNumeric, len, IsDate etc ?
Option 2 : (XML / XSD)
Generate an XML out of the XL file and validate it against the predefined XSD before importing the xml through .NET or through SSIS. Will this way be slow compared to option 1? Will I be able to validate the length of the data too? Will I be able to report exactly which row and column caused the error?
From your opinion which is good on performance and other aspects... Particularly when there is a an error, I should be able to report to the user exactly which row and column caused the error.
If there is a better way to handle this... Please let me know...
Thanks