Posts

Showing posts from July, 2025

Snowflake Vs MS-SQL - Part 75 - String Length and Trimmed Length

Image
           String Length and Trimmed Length Suppose you want to calculate the length of a string that contains trailing spaces. MS-SQL Server   We can achieve it by using functions like LEN & DATALENGTH : However, in  Snowflake,  we can use two functions,  LENGTH & RTRIMMED_LENGTH,  as below: For more details,  refer to  LENGTH  &  RTRIMMED_LENGTH . Yogesh Shinde LinkedInProfile <<< Back   Next >>>

Snowflake Vs MS-SQL - Part 74 - Convert Column Into Comma Separated

Image
          Convert Column Into Comma-Separated If you have data in a table and you want to convert columnar data into a comma-separated string. Current Data: Expected Data: MS-SQL Server   We can achieve it by anyone approaching below: However, in  Snowflake,  we can use two ARRAY functions,  ARRAY_AGG & ARRAY_TO_STRING,  as below: For more details, you can refer to:  ARRAY_AGG  &  ARRAY_TO_STRING . Yogesh Shinde LinkedInProfile <<< Back   Next >>>

Snowflake Vs MS-SQL - Part 73 - First Coming Sunday

Image
          First Coming Sunday Sometimes you have to calculate first for the coming Sunday. You must use that date for further calculations or filtering. MS-SQL Server   We can achieve this as follows: In  Snowflake,  we can use a similar approach  as below.  For more details, you can refer to the following:  NEXT_DAY . Yogesh Shinde LinkedInProfile <<< Back   Next >>>