March 5, 2013 at 7:30 am
Hi Experts,
In one of our database developers found an issue with data.
The data is 4F which is returned correctly when using this value and the same is returned when given 4F. That is the symbol is replaced with 'F'. have to give N' (unicode) while searching with both the symbol and F.
Any idea why this happens. The column data type is NVARCHAR.
Thanks in Advance
March 6, 2013 at 6:32 am
can anyone please help me on this??
March 6, 2013 at 6:36 am
It's difficult to find a question in your post. What are you observing now, and what would you like to see? Or are you looking for an explanation for an observation?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
March 6, 2013 at 6:43 am
Thanks Chris for the reply.
Problem i am facing is When selecting I am getting same data while using symbol F or F as search criteria both are giving the same result.
March 6, 2013 at 7:01 am
What is the collation of the server/database/column?
March 6, 2013 at 7:41 am
Ratheesh.K.Nair (3/6/2013)
Thanks Chris for the reply.Problem i am facing is When selecting I am getting same data while using symbol F or F as search criteria both are giving the same result.
SELECT
Descript,
MyString,
p2 = UNICODE(SUBSTRING(MyString,2,1))
FROM (
SELECT Descript = 'Normal Latin F', MyString = CAST(N'4F' AS NVARCHAR(2)) UNION ALL
SELECT Descript = 'Wide Latin F', N'4F'
) d
--WHERE MyString = '4F' -- need a width-sensitive collation here
WHERE MyString = N'4F' -- need a width-sensitive collation here
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
March 8, 2013 at 2:03 am
Thanks Chris..
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply