June 18, 2015 at 7:27 am
Hello,
I have a problem and I'm stuck. I have to import file .html to table.
create table dbo.test
(
Full_Row nvarchar(MAX) COLLATE Polish_CS_AS
)
BULK INSERT dbo.test
FROM 'C:\Temp\html_testy\EpuOrzeczenie__15046678.html'
WITH (CODEPAGE = 1250, FORMATFILE = 'C:\Temp\myTestFormatFiles.FMT' )
SELECT * FROM dbo.test
.Fmt file:
10.0
1
1 SQLCHAR 0 0 "\r" 1 Full_Row Polish_CS_AS
I do this like that because I would like to use this tools to parse html text. http://www.sqlservercentral.com/articles/HTML/88605/
This will be a procedure so I can't convert codepage in for example "notepad++" this .html file.
The results:
... Sąd Rejonowy Lublin-Zachód w Lublinie, stwierdza, że niniejszy tytuł...
But should be:
... Sąd Rejonowy Lublin-Zachód w Lublinie, stwierdza, iż niniejszy tytuł‚....
Someone have some solution for this problem?
June 29, 2015 at 3:29 pm
Hello,
It would appear you have a collation mismatch in there somewhere. Have a look at the collation of the server you're using as well as the file.
https://technet.microsoft.com/en-us/library/ms175194(v=sql.105).aspx
https://msdn.microsoft.com/en-us/library/ms143726.aspx
Hope that helps at least a little bit!
Cheers,
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply