INSERT or UPDATE query does not apply in SQL Server


#1

Hi - We’ve just recently created an on-premise instance of Redash and have established connection to our SQL Server databases. Created a query that performs an update of a column to a row in one of our tables in the database with an OUTPUT clause to see if changes were applied. It seems to have executed the query successfully but upon checking the table again, the row updated remains unchanged. Executed the update query a couple of times more and it’s still showing same original value. I’ve also tested same query in SSMS and it was successful in updating the row. Is this a limitation in Redash not being able to commit DML queries?


#2

Maybe you need to commit the transaction?


#3

Added the same code to an explicit transaction and commit… unfortunately, the same result. Changes still not applied on the database.


#4

Thanks @arikfr for the idea. Made this work after adding a commit line before closing the connection in the query runner.