Created
March 23, 2012 20:16
-
-
Save roalcantara/2174539 to your computer and use it in GitHub Desktop.
SQLServer - importar arquivo CSV
This file contains 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
BULK INSERT TB_TEMP --tabela com as mesmas colunas do arquivo CSV | |
FROM 'C:\Temp\File.csv'-- caminho do arquivo e formato | |
WITH ( | |
CODEPAGE = 'ACP', -- para arquivos com acento | |
FIELDTERMINATOR= ';', -- caractere que separa os campos no arquivo | |
ROWTERMINATOR= '\n') -- referencia para fim da linha | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment