Posts

Showing posts from November, 2024

Snowflake Vs MS-SQL - Part 52 - ORDER BY NULL

Image
               ORDER BY NULL If your table column is NULLABLE and contains NULL values then when we sort the data, NULL values come at the top by default. Actual Data: Expected Data: MS-SQL Server   We can achieve customized sorting as below. In  Snowflake,  we can use a similar approach as above.  However, Snowflake has an additional clause in  ORDER BY.  For more details, you can refer to the following  ORDER BY . Yogesh Shinde LinkedInProfile <<< Back   Next >>>

Snowflake Vs MS-SQL - Part 51 - STARTSWITH

Image
               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 >>>