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

          



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.


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