Snowflake Vs MS-SQL - Part 53 - CONTAINS

               


CONTAINS

If your table column has many records and you want to filter the data based on particular letter(s) consisting of. Eg. it should contain "tea"

Actual Data:
------------+
 DRINK_NAME |
------------+
 coffee     |
 ice tea    |
 latte      |
 tea        |
 [NULL]     |
------------+



Expected Data:
------------+
 DRINK_NAME |
------------+
 tea        |
 ice tea    |
------------+

MS-SQL Server 

We can achieve this by using the LIKE operator as below.



In Snowflake, we can use a similar approach as above. However, Snowflake has an additional operator CONTAINS



For more details, you can refer to the following CONTAINS.



Yogesh Shinde

LinkedInProfile

<<< Back Next >>>

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 36 - SPLIT_TO_TABLE

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 33 - INITCAP