Query Problem: A result set was generated for update

I am having periodic issues running a query in my Ignition script. I have a select statement and I am inserting the rows returned. Example below

INSERT INTO *my_table* ()
SELECT columns FROM *a_different_table*

Most of the time the query runs without issue but sometimes when it runs, I get an error and see this in the log A result set was generated for update.

I have also tried using SET NOCOUNT ON in my query but I get the same error.

I am using this command to run the query system.db.runPrepInsert() but recently changed it to system.db.runPrepUpdate(). But I am not confident that it will work so I'd like to ask if maybe someone has a different solution that I haven't tried.

Thanks for your help!

When you run that query outside of Ignition, does it return the Select resultset?
If so, you need to use system.db.runPrepQuery() otherwise Ignition panics as you are returning data.