We have been using SQL Server on Microsoft Windows Server 2003 SP2, and are now attempting to transfer across to a new server, running 2008 R2. One of our clients has a seperate jobs database which creates text files that are updated via FTP to a folder on our server 3 times daily, to then be imported into a corresponding series of tables in our database. Here is the old code for the import:
Delete
From Client.dbo.jobs
Go
BULK INSERT CarltonRR.dbo.jobs
FROM 'D:\folder\clientDatabaseUpload\jobs.txt'
WITH
(
DATAFILETYPE='char',
CODEPAGE = '65001',
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\|\n'
)
Go
After the initial errors, and subsequent searching, I removed the 'CODEPAGE = '65001', line because of the issues mentioned in this documentation, that 2008 R2 does not support UTF-8, however the database would automatically convert to UTF-16. This resulted in problems displaying some characters (£ for example) which the old system handles fine. The Data Type for the field(s) that are not displaying properly is varchar(50)
Is there a change that needs to be made to the SQL queries from 2003 to 2008 R2 that would allow the special characters in the .txt files to be displayed in the database?
Edit: The Data Type for the field(s) in question is nvarchar(50), not varchar(50) Edit 2: If it helps, the listed sign in replacement of the ' £ ' sign is ' ┬ú '