Snowflake Vs MS-SQL - Series Part 102 - Last Value in the Series - Part 102 Part 101 - Trigonometry Functions - Geometry - Part 101 Part 100 - Split String into Different Columns - Part 100 Part 99 - Multi-Table Insert based on condition - Part 99 Part 98 - Create Table If Not Exists - Part 98 Part 97 - Identify Data Type - SYSTEM$TYPEOF - Part 97 Part 96 - Row Last Updated - ROW_TIMESTAMP - Part 96 Part 95 - Date and Time - INTERVAL - Part 95 Part 94 - BOOLAND_AGG - Part 94 Part 93 - MERGE ALL BY NAME - Part 93 Part 92 - Stop or Cancel the Running Query - Part 92 Part 91 - ARRAY UNNEST - FLATTEN - Part 91 Part 90 - Replace the String - INSERT - STUFF - Part 90 Part 89 - Form the DATE from Parts DATE_FROM_PARTS - Part 89 Part 88 - Count of non-NULL records of the column using ILIKE - Part 88 Part 87 ...
Adding a comment to the Column of a Table Suppose you are designing a new table, and you want to add a comment for the columns of that table, so that whoever uses this table will get some idea of the columns of this table. MS-SQL Server We can achieve it by using a system-level stored procedure( sp_addExtendedProperty ), which uses Extended properties to allow you to store custom metadata: In Snowflake, we can use a similar approach by using the COMMENT clause as below: For more details, refer to COMMENT . Yogesh Shinde LinkedInProfile <<< Back Next >>>
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 >>>
Comments
Post a Comment