Posts

How to Import multiple csv/text files into SQL Server DB

Image
Importing data into SQL Server DB from CSV/Text Files This Tutorial uses SQL Server 2012 and CSV file that contains data to be import. Step 1: Create File Paths And Import csv File - Create folder "C:\ImportingFilesToDb" . - Create Subfolder 1 => "C:\ImportingFilesToDb\NewFiles" : The csv file will be kept in this location. - Create Subfolder 2 => "C:\ImportingFilesToDb\Archive" : The csv file will be archived in this location after being processed. - Download the CSV File and move it into subfolder 1 Step 2: Create SQL Tables and the stored Procedure - Create Table 1 => price_index : Holds imported csv data. CREATE TABLE [dbo].[price_index]( ...