UPDATE m
SET m.class_code = 'new cod'
FROM models as m
inner join type a on m.model_number = a.model_number
WHERE a.type_number NOT IN ( 1, 10 )
AND m.class_code = 'UN'
I have this query and in Ingres DB it doesn't want to run. I dont understand why. I sure it should work in MSSQL but in Ingres its throwing an error e_us0845 table does not exist or is not owned
Looks like a slight syntax error in the SQL which Paul posted. As I'm new to stackoverflow my rep is insufficient to comment on his existing answer, so I will add this separate answer instead.
update models as m
from type as a
set m.class_code='new cod'
where m.model_number = a.model_number
and a.type_number not in (1,10)
and m.class_code='UN';