Ver Mensaje Individual
  #6  
Antiguo 11-06-2008
Avatar de rastafarey
rastafarey rastafarey is offline
Miembro
 
Registrado: nov 2003
Posts: 927
Reputación: 21
rastafarey Va por buen camino
[quote=rastafarey;292774]
Código SQL [-]
Update t1 set c1 = (select 
case t1 
   when 1 then c2
   when 2 then c3
   when 3 then c4
   else c5
end
from t2 where condicion)
Código SQL [-]
Update t1 set c1 = (select 
case t1 
   when 1 then c2
   when 2 then c3
   when 3 then c4
   else 'S'
end
from t2 where condicion)
Creo que puedes interpretar la sentencia y usarla a tu manera.
__________________
Todo se puede, que no exista la tecnología aun, es otra cosa.
Responder Con Cita