vchar to nvchar

  • Hi,

    I'm trying to convert data-type of vchar to nvchar, so that I can read the chinese characters; else it looks like garbage.

    Please help

  • Are you talking about changing the data type in the table definition?

    alter table <tablename> alter column <columnname> NVARCHAR(size)

    if you are just converting at display time - it probably won't work because the correct characters will not have been stored.

    Guarddata-

  • Thanks GuardData...however, it does not seem to work. the original data is stored as varchar;by using alter , I still cannot see the chinese char; also there are some Korean chars which cannot be displayed properly.

    Please help.

    Thanks In Advance.

  • With this conversion,you convert from 'local' characterset to nvarchar. If you have stored non-'local' characters in your varchar (so they don't make sence), and you convert to nvarchar, they will be nvarchars that don't make sence because they will be convert from 'local' characterset to nvarchar.

    I guess you'll have to alter to nvarchar and reload your 'foreign' data.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply