I am trying to understand the update statement in SQL. I have tried many different ways of doing the work but nothing seems to be working. I have to join to table and ONLY on the joined rows, I have update a column text from "and" to "is".
This is exactly what I am trying to do. I hope this is making sense:
update (select t2.text from rules t1 inner join rules t2 on t1.parentid = t2.childid
where t1.parentid > 0 and
t2.value = to_char (t1.position))
set text = replace(text, 'and', 'is');
I would really appreciate all your help.