smallAreaHealthStatisticsUnit / rapidInquiryFacility

The Rapid Inquiry Facility (RIF) helps epidemiologists and public health researchers in environmental health activities.
GNU Lesser General Public License v3.0
14 stars 5 forks source link

Support Unicode in SQL Server BULK INSERT statements. #152

Closed devilgate closed 5 years ago

devilgate commented 5 years ago

As discussed in #79. Note that I have just added DATAFILETYPE = 'widechar' clauses to the WITH blocks of all the BULK INSERT statements.

Turns out we use them a lot. There are SQL scripts, Java classes and JavaScript files. Also at least one C++ file. I don't even know what that's doing there, but it didn't need to change, luckily.

Note that I haven't tested this.

peterhambly commented 5 years ago

Works with minor changes. Note does not fix #79; required bulk loader format (.fmt) files to be changed from SQL <COLUMN SOURCE="1" NAME="statefp" xsi:type="SQLVARYCHAR" /> to <COLUMN SOURCE="1" NAME="statefp" xsi:type="SQLNVARYCHAR" /> for those columns that are declared as NVARCHAR.