Snowflake Vs MS-SQL - Part 51 - STARTSWITH

              


STARTSWITH

If your table column has many records and you want to filter the data based on starting letter(s).

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



Expected Data:
------------+
 DRINK_NAME |
------------+
 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 STARTSWITH



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


Note: Similarly, you can use ENDSWITH


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