Albert Forcadell · Nov 21, 2016 go to post

thanks for that, but i insist on knowing that table before deleting. i have several queries without backup, and that will be my last option. would it be possible?.

Albert Forcadell · Nov 17, 2016 go to post

thanks a lot.

it seems that works. All in one line, with no carry changes.

UPDATE Prod.Articulos SET Alto = CASE CodigoNum WHEN '100' THEN 1646 WHEN '101' THEN 1646 END, Ancho = CASE CodigoNum WHEN '100' THEN 16 WHEN '101' THEN 16 END, Fondo = CASE CodigoNum WHEN '100' THEN 80 WHEN '101' THEN 80 END WHERE CodigoNum IN ('100','101') and empresa ='CO'

i try with more complete rows afected at real case.

Albert Forcadell · Nov 16, 2016 go to post

i ve tried with and without coma. also with simple statement

... and ERROR

UPDATE Prod.Articulos SET Alto = CASE CodigoNum WHEN '100' THEN 1646 END, Ancho = CASE CodigoNum WHEN '100' THEN 16 END, Fondo = CASE CodigoNum WHEN '100' THEN 80 END WHERE CodigoNum IN ('100') and empresa ='CO'

i am very interested in that option, that's really the only one i can apply at the moment i think, but with the right structure.

several rows - 3 fields to update - 2 'where' restrictions

please.

Albert Forcadell · Nov 16, 2016 go to post

thank you very much.

i understand a little your way but too advanced to me and colleagues to apply in regular queries.

it remains as a final resource ;)