Hi to everybody!.
We have a problem when we try to import a file into our database.
Our table is:
CREATE TABLE [dbo].[ACENTOS] (
[TEXTO] [char] (30) COLLATE
SQL_Latin1_General_CP850_BIN NOT NULL
) ON [PETICIONES_FG_Datos]
Our problem is related to ASCII Extended chars.
The content of the file we are trying to import is (FILE.DAT):
AEIOU aeiou ÁÉÍÓÚ áéíóú ñÑ
The format file we are using for the import is (FORMAT_FILE.FMT):
1 SQLCHAR 0 30 "" 1 TEXTO SQL_Latin1_General_CP850_BIN
And the sentence we are using is:
BULK INSERT PETICIONES.dbo.ACENTOS FROM "FILE.DAT" WITH (
CODEPAGE = 1252, FORMATFILE = 'FORMAT_FILE.FMT' )
This is only a test case.
The code page in our OS is 1252, and we are trying to convert the chars for the file to its correct representation into the database.
If we change the format file, and we specify in its header versión: 7.0, then the import is correct. But we dont know if our problem is a bug in the BULK INSERT process. In adition, we are considering the migration to SQL Server 2008, and dont know if we change now our file formats, if it will work in 2008.
Thanks for your attention!