I'm trying to run the following query on a database to replace the leading characters of certain rows.
UPDATE table SET path = :newpath || SUBSTRING(path FROM :pathlen)
WHERE path STARTING WITH :oldpath
So for parameter :newpath = foo, :oldpath = bar and :pathlen = 4, I want this
bar\wibble
to be changed to ...
foo\wibble
However, I get the error "expression evaluation not supported" and I'm not sure why. Replacing :pathlen
with a literal 4
works correctly, so it's definitely the SUBSTRING
causing the problem.