Snowflake Vs MS-SQL - Part 91 - ARRAY UNNEST - FLATTEN


ARRAY UNNEST - FLATTEN

If you have an array saved in a table and want to generate each value in each row as below:


MS-SQL Server 

We can achieve it as follows:



In Snowflakewe can use FLATTEN as follows:




For more details, refer to the FLATTEN section.


Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 70 - UNION By Name

Snowflake Vs MS-SQL - Part 68 - Multi Table Insert