What is the best solution to transfer Excel and csv data from files to SQL Server tables and use trigger to automate it to other tables?
1 Answer
The safest way would be to create an SSIS job for reading the excel/csv files run it via the Sql Server Agents. You can find details here https://learn.microsoft.com/en-us/sql/integration-services/load-data-to-from-excel-with-ssis?view=sql-server-2017
SQL statement for importing excel file
SELECT * INTO Data_dq
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0; Database=D:\Desktop\Data.xlsx', [Data$]);
For CSV files https://learn.microsoft.com/en-us/sql/relational-databases/import-export/import-flat-file-wizard?view=sql-server-2017