Can't combine sql update with join

Want to update a table record (computer) where computer_name match a record in another table (flowbot) where computer_name is a foreign key.
I can make the inner join function and update function work separately. Can't figure out how to combine them. Get this error:
could not determine data type of parameter $1

update computer
set latest_sw_ver = {{}}
where computer.computer_name in (
select computer.computer_name
from computer
INNER JOIN flowbot ON computer.computer_name = flowbot.computer_name
where flowbot.robot_id = {{}});

Hi @ThomasW Apologies for the delay here! Did you already sort out this query? :thinking: Nothing is jumping out to me as far as your syntax goes.

I'd recommend trying to replace the values inside the double curlies `{{}}` with hardcoded values as a test to ensure the query should work.

I'd also recommend double checking that you have prepared statements enabled on your resource (not disabled).

What type of SQL resource are you using (MySQL, Postgres, etc)?

Hi Tess
Yes got it working thank you. Replaced {{}} with values. Worked. And reinserted original code which now also works. Never understood what was different.

1 Like

:thinking: Interesting! Well, I'm glad it's working :pray: