How to Import a CSV File in an SQL Query
Channel: Data Analytics Ireland
Date: 2021-05-18

Are you wondering how to import a CSV file in an SQL query? Here we take you through the steps using SQL and openrowset. This will allow you to read the create a table, read the CSV file and load the file contents into the table you just created. Theoretically, you could do this for lots of files, as a result, you could automate certain tasks, as long as the file exists.

⏲⏲⏲TIMESTAMPS⏲⏲⏲
Beginning 00:00
Introduction 00:01
Import through menu option 01:35
Import through SQL query 02:44
Openrowset explanation 03:28
Insert using openrowset 05:55

The blog post with code is here: https://dataanalyticsireland.ie/2021/05/13/import-a-csv-file-with-an-sql-query/

Want to learn more about SQL: https://dataanalyticsireland.ie/tag/sql/

################     Let's be Social!    ##################

 Website - https://dataanalyticsireland.ie/
 Twitter - https://twitter.com/dataanalyticsi1
 Facebook - https://www.facebook.com/dataanalyticsirl
 Linkedin - https://www.linkedin.com/company/data-analytics-ireland
 Pinterest - https://www.pinterest.ie/dataanalyticsireland/

#sql #CSV #dataanalyticsireland #fileimport #csvimport #automation