REGEXP_LIKE conversion in SQL Server T-SQL
I have come across this line in an old report that needs converting to SQL Server. REGEXP_LIKE (examCodes, learner_code) examCodes being the source and learner_code being the pattern. I know that SQL Server doesn't have REGEXP_LIKE and most places tell you to use PATINDEX. Here's me thinking that this would work: PATINDEX(learner_code, examCodes) But I get the error: Msg 4145, Level 15, State 1, Line 54 An expression of non-boolean type specified in a context where a condition is expected, near 'WHERE'. On MSDN the syntax is specified as, PATINDEX ('%pattern%',expression) But learner_code is a