Skip to content
Advertisement

Tag: snowflake-cloud-data-platform

Snowflake Scripting in SQL – how to iterate over the results of a SHOW command?

I’m checking out the new SQL Snowflake Scripting (in preview), and I can’t figure out how to iterate over the results of a SHOW command — especially as some columns are lower cased. https://docs.snowflake.com/en/developer-guide/snowflake-scripting/ https://hoffa.medium.com/sql-scripting-live-in-snowflake-288ef8c272fa Answer You can use this example as a template to iterate over results of SHOW: First, note that you can get the resultset from show

Issues Splitting values separated by delimiters and creating columns for each split in snowflake

I am new to snowflake and I am trying to run an sql query that splits values with delimiters(semi-column) and create columns for each of them. Table name: lexa ID Value 001 2021-02-13 18:17:43;83.89.250.196;10.10.11.29 002 2021-02-13 17:47:56;5.33.18.24;10.10.11.28 what I am trying to achieve ID register Ip1 IP2 001 2021-02-13 18:17:43 83.89.250.196 10.10.11.29 002 2021-02-13 17:47:56 5.33.18.24 10.10.11.28 Answer Snowflake split

Self joining next date in table as another date field

Trying to work with an exchange rate table and a transactions table, and how the transactions are joined to the exchange table depends on when the most recent exchange rate for that currency was relative to the transaction. The table contains many duplicates and many types of currencies and other fields not relevant to this issue. I plan on joining

Advertisement