Q:

Convert DB2 SQL expression to Sql Server

Can anyone tell me the meaning of this query below?  
Also I'm trying to ocnvert this query into its SQL Server equivalent.  Any help if greatly appreciated.  Not familiar with Locate function or what the use of '||' means in DB2
DBstring is a column in the DB/
I'm on SQL Server 2012
 SUBSTR(DBstring, LOC('5'||CHR(9)||'CH', DBstring) + 2, 2) = 'CH'

I know SUBSTR is SUBSTRING in SQL Server.  I think SQL SERVER has a LOCATE function. 
Specifically I'm not sure what this part of the query is doing ' LOC('5'||CHR(9)||'CH', DBstring) + 2'

A:

I think loc is equivalent to locate.   The expression in SQL Server would be:
substr(dbstring, charindex('5'+CHAR(9)+'CH', DBstring) + 2, 2) = 'CH'

