Skip to content

Instantly share code, notes, and snippets.

@mykwillis
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykwillis/cffe1981586d8948f502 to your computer and use it in GitHub Desktop.
Save mykwillis/cffe1981586d8948f502 to your computer and use it in GitHub Desktop.
Populate MSSQL table with CSV
BEGIN TRANSACTION;
TRUNCATE TABLE MultiListingCampaignMappings;
BULK INSERT MultiListingCampaignMappings
FROM 'c:\users\Administrator\multimappings.csv'
WITH
(
FIELDTERMINATOR = ',', --CSV field delimiter
ROWTERMINATOR = '\n' --Use to shift the control to next row
);
COMMIT TRANSACTION;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment