Posted by Wael on 03/24/06 20:30
Hi
I have a script that uses bcp to import data from an ascii text file
into SQL tables. The french characters are not copied properly. They
are converted to letters of the alphabet. I tried to change all the
fields to nvarchar instead of varchar and nchar instead of char, but I
got Greek characters instead.
How can I fix this?
Here is some code:
--------------------------
CREATE TABLE [dbo].[1_HLGT_HLT_COMP_f9.0] (
[hlgt_code] [int] NOT NULL ,
[hlt_code] [int] NOT NULL
) ON [PRIMARY]
GO
PRINT 'HLGT_HLT'
DECLARE @s as nvarchar(300)
SET @s='bcp MedDRA..[1_hlgt_hlt_comp_f9.0] in ' + char(34) +
'F:\MedDRA\9.0French\MedAscii\hlgt_hlt.asc' + char(34) + ' -c -t' +
char(34) + '$' + char(34) + ' -r$\n -e' + char(34) +
'F:\MedDRA\9.0French\logs\hlgt_hlt.err.txt' + char(34) + ' -b250 -m50
-SDEV -Usa -Ppassword -h' + char(34) + 'TABLOCK' + char(34)
EXEC master..xp_cmdshell @s
[Back to original message]
|