SQL SERVER 2005

  • my query as following:

    i have a list of items in table,all items are written in english like:

    education

    sports

    entertainment

    but i want these items in hindi as

    शिक्षा

    खेल

    मनोरंजन

    i tried to do so by

    insert into tname values('मनोरंजन')

    command executed successfully but it does not show hindi when i open table,it shows ?????? like this.

    plz solve my problem

  • make sure your data fields are NVARCHAR, not plain old varchar.

    after that, make sure when you are inserting the data that you specifically cast them as nvarchar...selecting a varchar into an nvarchar field wills trip out the high characters you are trying to preserve.(use text mode to see the results...grid view will display bars.

    select '??????','???','???????' (defaults to varchar, returns ????????????????)

    select N'??????',N'???',N'???????'(nvarchar, returns ????????????????)

    create table #TMP(myvarchar varchar(60),mynvarchar nvarchar(60) )

    insert into #tmp

    select '??????','??????'

    UNION select N'??????',N'??????'

    select * from #tmp

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

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