Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bhushan.panchabhai
Starting Member
1 Post |
Posted - 2008-08-07 : 11:53:15
|
Hi, I am trying to upload file which contains characters from different languages like french, chinese, turkish, greek etc. to database using bcp. This is my table ->CREATE TABLE [dbo].[Emp]( [EmpID] [int] NOT NULL, [EmpName] [nvarchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL) ON [PRIMARY]This is my file to upload->asagi 1anotheruser 2user3 3(Notice that EmpName appears before EmpID in input file.)This is my format file ->9.021 SQLNCHAR 0 800 "\t\0" 2 EmpName SQL_Latin1_General_CP1_CI_AS2 SQLINT 0 12 "\r\0" 1 EmpID ""When I run command ->bcp database1.dbo.Emp in c:\EmpData.txt -f c:\EmpFMT.fmt -S dbserver -U sa -P passThis is what I get in database ->EmpID EmpName852017 ?asagiUnicode characters are preserved but,There are following issues ->1. I get only one record instead of all three. 2. inserted record has wrong EmpID. (EmpID is NOT identity/primary key)I wonder whats going wrong here.Please help. |
|
|
|
|