UTF - Multi Language Number System, need help, urgently!!!

  • Hi All,

    I have a requirement that I have a table in which we want to add a column for Price which will save the price of a commodity but this would be in different language numeral i.e. in Chinese Numerals.

    This I have achieved with the help of UTF8String UDT ( http://msdn.microsoft.com/en-us/library/ff877964 ) but this will save as characters not the numerals. Now our concern is that we want do the mathematical manipulations on that particular field like Addition, Multiplication, Division, Substraction, etc.

    I am using SQL Server 2008 R2

    Thanks in Advance!!

    Sumit Rastogi:cool:

  • To be honest, I don't quite see why there is a requirement to store numbers with a specific language characters. I would store the data as int, decimal and so forth, and rather do the conversion as data was retrieved, or if possible in the client code.



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]

  • Thanks for your reply, okbangas...

    Actually we are storing information in chinese(traditional) language throughout the database, so that, we also like to store chinese numerals instead of english numerals for Price/Amount, and do the manipulation accordingly.

    Please help!!!

    Thanks,

    Sumit:-)

  • i did some work for a prospect in CHINA in order for me to display the chinese characters i used NVARCHAR data type and downloaded the latest chinese language package in order for them to be displayed in my UI

    ***The first step is always the hardest *******

  • Hi SGT_squeequal,

    Actually I am able save the chinese language data in my database but all those data are in character form not in numeric, but here my concern is that I want a field with data type int/numeric/decimal in which data must be stored in chinese number system, and do the manipulation accordingly.

    Thanks,

    Sumit:-)

  • Sumit Rastogi (7/11/2012)


    Actually we are storing information in chinese(traditional) language throughout the database, so that, we also like to store chinese numerals instead of english numerals for Price/Amount, and do the manipulation accordingly.

    I'll have to disagree. Int for instance, stores the data binary, so that you can perform calculation on them eg, the int value of 255 is stored as 0x000000FF (or 00000000000000000000000011111111b if you like that notation better). In SQL Server Management Studio however, the value is seen in latin characters, but your application may display it in what ever way it likes. Additionally, you may create a routine to get the chinese text representation of your values, or to get the binary representation of numbers written with chinese characters. In my humble opinion, this is the way to do it.



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]

  • Sumit,

    Please don't make duplicate posts on the same issue. It is considered rude to repost the same question multiple times, especially to the people trying to help you.

    http://www.sqlservercentral.com/Forums/Topic1328029-391-1.aspx

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 7 posts - 1 through 6 (of 6 total)

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