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
 Issue with Select Query with Russian Chars

Author  Topic 

velnias2010
Posting Yak Master

125 Posts

Posted - 2010-09-16 : 10:56:04
Hey I have a column in my table (column = comments) which now and then contains russian characters.

I changed this column to NVARCHAR and it stores these fine.

Now i am trying to retrieve the russian characters but they are not appearing correctly.

I am trying to do the following to fix the problem

SELECT N'comments'
FROM tblContactUs
ORDER BY dateAdded DESC

but this was not good i just get back "comments" string instead of my actual comments

Any help would be appreciated

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-09-16 : 11:16:37
This
SELECT N'comments'
is selecting a literal string comments.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

velnias2010
Posting Yak Master

125 Posts

Posted - 2010-09-16 : 11:20:58
Yup....thats what I mentioned :P

My query was how to correctly perform the statement.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-09-16 : 11:29:44
How can you know that it stores these fine when you are not able to see your text?
Maybe this helps:
http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/4b66351c-0752-4987-b478-a8c58539b88d


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

velnias2010
Posting Yak Master

125 Posts

Posted - 2010-09-16 : 11:37:57
It the database it stores fine, when I view my table in Management Studio.

It is when I try perform a select query and print out on a page im having the issues

i.e
In DB ????????? ??????????! ????????
On the page printed out i.e Уважаемые �отрудники! Пришлите пожалуй�та бе�платный образец. Заранее благодарна Ольга
Go to Top of Page

velnias2010
Posting Yak Master

125 Posts

Posted - 2010-09-16 : 11:38:54
Ah I dunno why in the post the russian is coming up as ????????? thats when I copied and pasted just to clarify they are stored correctly.
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2010-09-17 : 08:39:15
The second example you have there looks like UTF-8 misrendered as Windows 1252, if that's any help. If it's displaying ok in SSMS then I don't think it can be getting stored as UTF-8, and since SQL Server doesn't have any native UTF-8 support that must occur outside SQL Server.

According to Google, the phrase translates as, "Dear members! Please send a free sample. Thank you in advance, Olga".

quote:
Originally posted by velnias2010

It the database it stores fine, when I view my table in Management Studio.

It is when I try perform a select query and print out on a page im having the issues

i.e
In DB ????????? ??????????! ????????
On the page printed out i.e Уважаемые �отрудники! Пришлите пожалуй�та бе�платный образец. Заранее благодарна Ольга

Go to Top of Page
   

- Advertisement -