I am getting the error
syntax error at or near "where" LINE 5: where zip in (select zipcode from zips where city = 'Sacra
when I try to run this code.
update listings
set price = CASE WHEN (listings.price IS NOT NULL) THEN (price *
(((100+(select price_change from zips where zips.zipcode=listings.zip))/100)))
where zip in (select zipcode from zips where city = 'Sacramento');
Does anybody see any easy to fix errors? or did I come up with some garbage code?
elsepart. Just addprice is not nullto your where clause and you can get rid of the wholeCASEand make the update even more efficient.