Dear Statalist
In Stata 13 I could import all string variables correctly (i.e. Danish special characters) with the one-line code:
In Stata 14 I found this solution to deal with the unicode awareness of Stata 14:
Is it possible to import my data with the correct encoding using a one line code is Stata 14?
(That is, without saving, clearing, translating and using the data afterwards).
Rgards Kim
My SQL info:
Microsoft SQL Server Management Studio 10.50.2500.0
Microsoft Analysis Services Client Tools 10.50.2500.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 4.0 6.0
Microsoft Internet Explorer 8.0.7601.17514
Microsoft .NET Framework 2.0.50727.5485
Operating System 6.1.7601
In Stata 13 I could import all string variables correctly (i.e. Danish special characters) with the one-line code:
odbc load, table("dbo.V_Kim_Statistik") clear lowercase noquote dsn(PEBLData)
In Stata 14 I found this solution to deal with the unicode awareness of Stata 14:
odbc load, table("dbo.V_Kim_Statistik") clear lowercase noquote dsn(PEBLData)However, this is tedious and time consuming.
save "my_file.dta"
clear
unicode encoding set "latin1"
unicode translate "my_file.dta"
use "my_file.dta"
Is it possible to import my data with the correct encoding using a one line code is Stata 14?
(That is, without saving, clearing, translating and using the data afterwards).
Rgards Kim
My SQL info:
Microsoft SQL Server Management Studio 10.50.2500.0
Microsoft Analysis Services Client Tools 10.50.2500.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 4.0 6.0
Microsoft Internet Explorer 8.0.7601.17514
Microsoft .NET Framework 2.0.50727.5485
Operating System 6.1.7601
Comment