0

I have 40 CSV files to import on one table, while importing it always creates a new table against each CSV. I am stuck on what to do and is any query for it to import all data from CSV and dump it in one table.

enter image description here

I try below query as well

BULK INSERT dbo.OBD_dataset4
FROM 'C:\Users\abc\Downloads\OBD_data\OBD_data\OBD_dataset5.csv'
WITH
(
    FIRSTROW = 2,
    FIELDTERMINATOR = ';', 
    ROWTERMINATOR = ' ',   
    TABLOCK,
    CODEPAGE = 'ACP'
);

I am using SQL Server Management Studio V17.**

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • Does this answer your question? [Import Multiple CSV Files to SQL Server from a Folder](https://stackoverflow.com/questions/16076309/import-multiple-csv-files-to-sql-server-from-a-folder) – arcee123 Feb 01 '21 at 05:27
  • not resolve my query – Arqam Rafay Feb 01 '21 at 05:47
  • The import wizard may be unhelpful and require a new table but, as you've seen, the `BULK INSERT` statement doesn't have that issue. Just execute it multiple times - with a different source path each time. – AlwaysLearning Feb 01 '21 at 09:36

0 Answers0