[postgis-users] query error when combining UPDATE, CASE and WHERE
luckyclare at hotmail.com
Fri Dec 31 09:23:27 PST 2010
I try to update one column value based the other two column values´s conditions. This code works
select book, case when table1.price>200 and table1.price<400 then '40'else book end from table 1 where table1.catalog='112';
Now I want to update the table1, so the book value will change into 40 when the other two conditions are true.
update book, case when table1.price>200 and table1.price<400 then '40' else book end from table 1 where table1.catalog='112';
It gives error. Can anyone help me?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users