Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
SELECT CONVERT(INT,Substring(MessageID,16,LEN(MessageID)-15)) AS GRP_ID,Message from MESSAGES WHERE MessageGroup='Screen' and MessageID LIKE 'MISSION_%' AND CONVERT(INT,Substring(MessageID,16,LEN(MessageID)-15)) IN (1,2,3)
Because of collate sensitive reason, I want to apply COLLATE SQL_Latin1_General_CP1_CS_AS to it.Can you please tell me how?Thanks
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts
Posted - 2010-03-03 : 14:11:44
This?
SELECT CONVERT(INT,Substring(MessageID,16,LEN(MessageID)-15)) AS GRP_ID,Message from MESSAGES WHERE MessageGroup COLLATE SQL_Latin1_General_CP1_CS_AS ='Screen' and MessageID COLLATE SQL_Latin1_General_CP1_CS_AS LIKE 'MISSION_%' AND CONVERT(INT,Substring(MessageID,16,LEN(MessageID)-15)) IN (1,2,3)