Home Forums SQL Server 7,2000 T-SQL How to find PATINDEX for [ RE: How to find PATINDEX for [
Eirikur Eiriksson
SSC Guru
Points: 182882
More actions
April 22, 2014 at 1:24 am
#1707628
You are better off using the CHARINDEX function, and CHAR or NCHAR functions when dealing with special characters.
😎
DECLARE @TEST_STR NVARCHAR(128) = N'ASDFGHJ[QWER';
SELECT CHARINDEX(NCHAR(91),@TEST_STR) AS POS
Result
POS
----
8