I have an Excel file with approximately 300k records and I want to delete these rows from a SQL Server table.
I tried using INSERT for each record but that takes way too long. I also tried to create a temporary table with the Excel data so I can just delete from the main table by matching it with the temp table, but inserting records into the temp table also took too long.
I don't have the necessary permission to directly load Excel data into the database either. And bulk insert only takes 1000 records apparently so that doesn't help.
Does anyone know what the most efficient way to delete these records is? The dataset contains records that are identified as unique through 3 or more columns, so each of my INSERT statements would need at least two WHERE conditions.