Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server-2008
i am using this subquery in sql 2008
but getting an error plz heml.
 

 
SELECT  Name, UserName,Gender,Location,user_skill,intro  FROM wizom_User_Signup_Info
WHERE   UserName in(select UserName from Wiz_skill_details where Category_Name='IT' )
 

error is
Msg 468, Level 16, State 9, Line 1
Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
Posted 8-Mar-13 0:19am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Execute this Query""it will query.If not let me know..
SELECT  Name, UserName,Gender,Location,user_skill,intro  FROM wizom_User_Signup_Info
WHERE   UserName in(select UserName COLLATE Latin1_General_CI_AI from Wiz_skill_details where Category_Name='IT' )
  Permalink  
Comments
Maciej Los at 8-Mar-13 14:58pm
   
Good work, +5!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Check example about Collate
 

DECLARE @A  VARCHAR(10)
SELECT @A = 'a'
 
IF (@A = 'A')
PRINT 'Match'
ELSE
PRINT 'No Match'
----------------------Execute seperately------------------------------
DECLARE @A  VARCHAR(10)
SELECT @A = 'a'
 
IF (@A = 'A' COLLATE SQL_Latin1_General_CP1_CS_AS)
PRINT 'Match'
ELSE
PRINT 'No Match'
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

select J_id,email,fname,cl,mbn,gender,qualification from registration where J_id in(select collate Latin1_General_CI_AI J_id from login where active='True' )
this query is showing error Incorrect syntax near the keyword 'collate'
  Permalink  
Comments
Maciej Los at 9-Apr-13 6:42am
   
Is it an answer? Not! Please, remove it. If you have any question, use "Have a Question or Comment" widget.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 9 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100