I need suggestion on best approach from below listed options. I need to validate excel file data and load it to SQL Server
Validations include
- Non Duplicate columns
- Mandatoty fields present
- Fields not present in Database
In case of error I would write in errorlog table in database
Below is my approach
- Load the Data into a Temp Table in Database
- Run the Validations
- Log the Error
- On success load it to main tables
Please let me know if you have any other better ideas for this scenario
directly into main table.
(use can use bulk insert task if the excel is really large instead of dealing RBAR)
2. Using TSQL