Skip to content

Tag: sql

How can i grant an execute statment

I want to grant TRIGGERS, FUNCTIONS and PROCEDURES to a role. I have the code to do it with procedure but with triggers and functions it not work. Answer User owns tables, functions and procedures. That user created a role and wanted to grant execute on various objects to the role. for triggers, it doesn&#821…

Insert into Nested records in Bigquery

Iam using Bigquery to insert nested records into the table but eventually landed into error scenario. Schema: Code: with the above code, I couldn’t able to load the values into table. Please help me by letting know how exactly we can pass values into nested records. Answer Try below instead

How can I get a query displayed monthly with a subquery

I have a query here with a subquery. This shows me the complete result for the year. How do I get it to be displayed to me on a monthly basis. I’ve tried a few things but always get an error message Here my query The result should look like this: Thank you Answer You can probably simplify this by