
Hi
You are in right place to get clarify.
Your problem is looks like
COLLATION. Just clarify yourself with the following workarround.
1. Modify your query and run as given below
select 'Both are A' 'Result' where
'A' = 'A'
(or)
select 'Both are A' 'Result' where
'a' = 'a'
- If its working fine ? Try the folloiwng... Your database is Adventureworks. Correct ? Try the folloiwng script
Use Adventureworks
DECLARE @DBName VARCHAR(50)
SELECT @DBName = DB_NAME()
IF EXISTS(SELECT 1 FROM fn_helpcollations() WHERE [name]=DATABASEPROPERTYEX(@DBName,'Collation')
AND description LIKE '%case-sensitive%')
SELECT 'YES. Your Database Is Case-Sensitive' 'Sensitivity'
ELSE
SELECT 'NO. Your Database Is Not Case-Sensitive' 'Sensitivity'
- What is the result of the script given ?
If the result is "
YES. Your Database Is Case-Sensitive " then the root cause is COLLATION setting of your database(Adventureworks).
Solution :
- Try to change the COLLATION setting of your database.(If required)
(or)
Try the following query instead
Suppose, If your Database COLLATION is
SQL_Latin1_General_CP1_CS_AS then try this...
SELECT 'Both are A' 'Result' WHERE 'A' = ('a' COLLATE SQL_Latin1_General_CP1_CI_AS)
I think, Now your problem solved If my guess is correct.
please come back, If you have any issue further.
Cheers
Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions
Sanyok, if this helps please login to Mark As Answer. | Alert Moderator