Snowflake Vs MS-SQL - Part 55 - POSITION

POSITION If you want to search for a single character or group of characters in another string. ------------------------------------+------------+ Available_String | Position_1 | ------------------------------------+------------+ nevermore1 , nevermore2 , nevermore3 .| 1 | -----------------------------------+------------+ In this case, we want to search " nevermore " in the string " nevermore1, nevermore2, nevermore3 .". It should return the position as 1. MS-SQL Server We can achieve this by using the CHARINDEX() as below. To get the second occurrence, we need to use the third parameter of CHARINDEX() as CHARINDEX('nevermore', province,5). In Snowflake, we can use a similar approach, which is REGEXP_INSTR () . This gives you the flexibility to find a second occurre...