I would like to import a csv file into an empty table in SQL Server Developer 2016, using Task Wizard. I know with BULK INSERT there are options to specify firstrow and lastrow; does Import Wizard have a similar feature?
SQL Server Task Wizard – How to Specify Import Row Range
csvsql serversql-server-2016
Related Question
- SQL Server – Error When Importing Data Using Import & Export Data Wizard
- SQL Server – Bulk Insert Data into Table with Always Encrypted Columns
- Easiest Way to Import Access DB (.accdb) into SQL Server 2016
- SQL Server 2016 – Import Wizard Excel Error 0xc020901c
- Sql-server – Can’t create SSIS package from Import and Export Wizard
- SQL Server – View SQL Code Behind Flat File Import Wizard
Best Answer
The wizard only has the option to skip the first x rows...more complex than that would need to be a regular SSIS package, or some pre-processing of the file before the wizard picks it up.
Alternatively, import the whole file to a staging table and then trash the rows you don't need, or push the ones you do want into the correct destination table in a T-SQL statement.