I am trying to use ?
in the following way (I use it in Golang to generate query, but it seems like it is not Go dependent):
WITH Tmp(name, enabled) AS (
VALUES(?, ?),(?, ?)
)
UPDATE table_groups
SET enabled = (SELECT enabled
FROM Tmp
WHERE table_groups.name=Tmp.name)
WHERE table_groups.name IN (SELECT name FROM Tmp)
getting:
syntax error at or near ","
If I substitute ?
in the above statement by concrete values, everything works fine. Is there a problem using ?
with WITH
and how would I get around it? Thanks.