SQL Resource - I'm stuck trying to UPDATE & SET to add "Value" to "Current Value".. Please help

To introduce my project:

I've managed to connect my Shopify Store API so that when a product is purchased, it will grab the note from the Shopify Customers API & process the order and fulfill it all through RESTAPI. I've defined the "customer note" as an "account id", so this isn't the issue, I just wanted to provide context.

My problem is the following:
So I run an internet cafe with old software that uses MSSQL 2008 R2 Database in order to keep records of customers accounts.

Here's an example of the command I'm trying to run:
UPDATE TableName
SET CustomerCredit = CustomerCredit + 10
WHERE CustomerAccountNumber = '{{ Table.selectedRow.note }}'

For what I'm trying to do, I haven't been able to get Raw SQL commands to work, and it doesn't seem there's a way for me to "SET" in the GUI.

Can you please help me? This problem is the only thing holding me back from subbing to Retool for Business use.. I've been trying to use ChatGPT to build applications, and while I'm banging my head against the wall trying to figure this out (jk), I'm learning a lot but I'm really stumped and just want to figure this out once and for all.

Hi @Invictus we're happy to help! Thanks for reaching out. We definitely want to make development faster & easier, rather than having people banging their heads against a wall

Sounds like a cool app use case!

I know that you had mentioned looking at GUI mode already, but I do think it's worth trying to do this in GUI mode first. Are the CustomerAccountNumbers all unique? If so, this should work well with the GUI mode's 'Update an existing record' action.

This query:

UPDATE TableName
SET CustomerCredit = CustomerCredit + 10
WHERE CustomerAccountNumber = '{{ Table.selectedRow.note }}' 

Looks pretty much like this in GUI mode:

One question I have is that you are referencing CustomerCredit (CustomerCredit + 10), but I'm not sure where that is defined? Are you looking to add 10 to whatever value the CustomerCredit already is? If so, it would help to query the current CustomerCredit data for the item & reference that inside of {{}}, similar to how I'm referencing {{Table.selectedRow.CustomerCredit}}.

Hope this helps! Keep me posted about the CustomerCredit value.

Since you mentioned that the query isn't working, it would also help to see the specific error message. Thanks!