Inserting multiple sql statement in a query

Hi! I have a query that has multiple delete statements.
Example

-- DELETE FROM table1 WHERE id={{id}}
-- DELETE FROM  able2 WHERE id={{id}}
-- DELETE FROM table4 WHERE id={{id}}

But when I run it, I get the following error: cannot insert multiple commands into a prepared statement

What's a workaround?

Hey @sanketchauhan, welcome to the fam :hugs:

You can disable that in your resource settings.

Does that work for you?

1 Like

Hmm doing that leads to breaking of my dashboard at a variety of places. Seeing below errors at a lot of tables / queries i have
image

Hey @sanketchauhan!

We often recommend creating two separate resources - one with prepared statements and one without. Doing so should let your existing queries continue to function normally while letting you use the resource with prepared statements disabled only where absolutely necessary. You can read more about disabling prepared statements here!

1 Like