Alas, no. Same error.Does the insert statement work if you rewrite it to INSERT INTO resource_usage (resid,itemid,itemtype) (SELECT resid, CAST(? AS INT), CAST(? AS VARCHAR(32672)) FROM resource_usage WHERE itemid=? AND itemtype=? AND NOT EXISTS (SELECT resid FROM resource_usage WHERE itemid=? AND itemtype=?)); ?
As soon as I fix this I will look into this further!Of course, it's a bug that the compiler doesn't catch this and report a syntax error. It would be worth filing a bug report to get this improved.
If we were to define a religion to be a system of thought
unprovable statements, so it contains an element of faith,
has taught us that not only is mathematics a religion but
it is the only
religion able to prove itself to be one.
— John Barrow, Pi in the Sky