1
I downloaded a list of cities on the internet. There are more than 5,000 municipalities. I tried a simple Insert and could not. Exceeded the maximum number of 1000 records. Then I tried with Bulk, but I do not know if I did right or not, the fact is that it gives error. My Bulk is like this:
BULK INSERT CIDADE
FROM 'C:\Lixo\Cidade_Brasil.txt'
And my txt is in this format:
(1, 'Afonso Cláudio', 8),
(2, 'Água Doce do Norte', 8),
(3, 'Águia Branca', 8),
(4, 'Alegre', 8),
(5, 'Alfredo Chaves', 8),
(6, 'Alto Rio Novo', 8),
(7, 'Anchieta', 8),
(8, 'Apiacá', 8),
(9, 'Aracruz', 8),
(10, 'Atilio Vivacqua', 8),
(11, 'Baixo Guandu', 8),
(12, 'Barra de São Francisco', 8),
(13, 'Boa Esperança', 8),
......;
And that’s the error message:
Message 4832, Level 16, Status 1, Line 3 Bulk loading: end unexpected file in data file. Message 7399, Level 16, State 1, Line 3 The OLE DB provider "BULK" for the server linked "(null)" reported an error. The provider did not provide error information. Message 7330, Level 16, Status 2, Line 3 Unable to fetch a line from the OLE DB "BULK" provider to the linked server "(null)".
Names that have simple quotes, for example
olho d'agua
are escaped?– rray
I didn’t even think about it. I will correct them all. But the syntax of Bulk is the same?
– pnet
So back to your example, eye d
agua está assim: `(161, 'Olho d
Water of the Flowers', 2),`, without quotation marks and yes with "crase" and I realized it is so for all.– pnet