Skip to content
Advertisement

Tag: scripting

BigQuery: JOIN on single matching row

I have two tables, one containing orders with a nested line_items structure and another with a pricing history for each product sku code. Orders Table order_id order_date item_sku item_quantity item_subtotal 1 2022-23-07 SKU1 7 12.34 SKU2 1 9.99 2 2022-12-07 SKU1 1 1.12 SKU3 5 32.54 Price History Table item_sku effective_date cost SKU1 2022-20-07 0.78 SKU2 2022-02-03 4.50 SKU1 2022-02-03

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

How to execute an .SQL script file using c#

I’m sure this question has been answered already, however I was unable to find an answer using the search tool. Using c# I’d like to run a .sql file. The sql file contains multiple sql statements, some of which are broken over multiple lines. I tried reading in the file and tried executing the file using ODP.NET … however I

Advertisement