0

I have created a database in sql server. It has three tables. I have three csv files for these tables(all the csv files are in same folder). Data format is same in both csv and db table.

Currently I am using SQL Server Import and Export Wizard to load data from csv files. But in this way I can only insert data into one table. I have to repeat the same task multiple times.

Is there any way to insert data into multiple table from multiple csv files in single query?

Thanks

4
  • use bcp.exe command line tool, or use bulk insert command. you can't do it in a single command, but it can be automated so run as a script as opposed to wizard. Commented May 2, 2017 at 5:35
  • You can do it using SSIS Transaformation tasks Commented May 2, 2017 at 6:35
  • I never worker with SSIS. Can you please explain how can I achieve this using SSIS? Thanks @Srini131 Commented May 2, 2017 at 12:04
  • stackoverflow.com/questions/18872747/… Go through this link Commented May 2, 2017 at 13:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.