Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/07/2011, 10:54
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Duda de update con case when y select anidado

Lo tendrias que hacer asi:


update table
set valor=t1valornuevo
from
(
select case
when condicion1 else condicion 2 end as valornuevo from tabla
) as t1


saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me