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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Japanees Character Issues

Author  Topic 

varathan
Starting Member

1 Post

Posted - 2010-12-29 : 04:23:38
Hi Guys,
I have one problem while doing bulk insert the Japanees Character Showing Like this ???.
I am using format file please see the my format file below.
(I think have to change formate file collation) Please urgent.
9.0
3
1 SQLCHAR 0 2000 “\t” 1 MarketPlace ""
2 SQLCHAR 0 1000 “\t” 2 Title ""
3 SQLCHAR 0 2000 “\n” 3 Address ""


SELECT
*
FROM
OPENROWSET(BULK '\\MD0001\SharedDocs\Varadarajan\JP_DataFile.txt',FORMATFILE = '\\MD0001\SharedDocs\Varadarajan\AmzJP.fmt') AS t1

I want result Like this
--------------
MarketPlace Title Address
AmazonUK Test Title for UK UK
AmazonUS Test Title for US US
AmazonJP ????? ??


But Showing
-----------
MarketPlace Title Address
AmazonUK Test Title for UK UK
AmazonUS Test Title for US US
AmazonJP ???? ??.



Varathan

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-12-29 : 04:41:07
Format file is like
8.0
4
1 SQLCHAR 0 0 "," 1 i Latin1_General_CI_AS
2 SQLCHAR 0 0 "," 2 s Latin1_General_CI_AS
3 SQLCHAR 0 0 "," 3 t Latin1_General_CI_AS
4 SQLCHAR 0 0 "\r\n" 4 u Latin1_General_CI_AS

Try changing the collation to suit your data in your format file.
Note - if it's UTF8 then it's no longer supported and you probably need to use SSIS.




==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -