I want to update all the records of a table (tbl_DepresacionesUmas) where the status is different to low but when doing that, it returns more than one value and generates an error, how can I solve that in sql?
Update Tbl_DepresacionesUmas
set ValorActual =ValorInicial
where Estatus != 'Baja'
Update Tbl_DepresacionesUmas
set Dias = ( DATEDIFF(Day,Fecha_Inicio, GETDATE()))
where Estatus != 'Baja'