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 errorlo开发者_开发技巧g 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
Here are couple of approaches that are possible:
- Using SSIS
(use can use bulk insert task if the excel is really large instead of dealing RBAR)
2. Using TSQL
精彩评论