Import CSV rows with 2000 records from node into SQL Server

181
February 06, 2018, at 2:03 PM

I am using exceljs (https://www.npmjs.com/package/exceljs) node package to read excel file.

I am looking for fast import csv with 2000 records into SQL Server.

Table:

User [Id PK]
Role [UserId FK]
Unit [UserId FK]

Excel file:

UserName Role  Unit 
Jack      1    Unit1 
Answer 1

@Furqan, did you try executing BULK INSERT command to import CSV file contents into SQL Server database table

Here is sample target table

create table UploadTable (
    [User] varchar(100),
    [Role] varchar(100),
    Unit varchar(100)
)

After you create your table try following SQL command

BULK INSERT UploadTable FROM 'c:\kodyaz\upload.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '0x0A'
)
Rent Charter Buses Company
READ ALSO
What's an efficient way to select an element by accessibility label in selenium-webdriver and appium?

What's an efficient way to select an element by accessibility label in selenium-webdriver and appium?

I've just started auto end-to-end testing with my react native app, both ios and android, context is nodejsClient is selenium-webdriver, which connects to appium server

228
Passport-saml authentication with ES6 nodejs

Passport-saml authentication with ES6 nodejs

I am trying to authenticate my app using saml based authenticationI see lot of examples for same but those are in ES5 way (module

263
Why am I unable to set S3 as a trigger for my Serverless Lambda Function?

Why am I unable to set S3 as a trigger for my Serverless Lambda Function?

I am attempting to set a NodeJS Lambda function to be triggered when an image is uploaded to an S3 bucketI have seen multiple tutorials and have the yml file set up as shown

192