Created
September 13, 2018 08:58
-
-
Save csaba-farkas/8b4a0a7d3aaf13be725d23d67c8d5feb to your computer and use it in GitHub Desktop.
[Import from CSV to SQL] #SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE #users ( | |
Name VARCHAR(500), | |
DOB DATETIME, | |
PPSNumber VARCHAR(30) | |
) | |
BULK INSERT #users | |
FROM 'D:\Users.csv' | |
WITH | |
( | |
FIRSTROW = 1, | |
DATAFILETYPE='widechar', | |
FIELDTERMINATOR = ',', | |
ROWTERMINATOR = '\n', | |
TABLOCK, | |
KEEPNULLS | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment