Tema: NULL a 0
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/10/2005, 14:11
Avatar de Mithrandir
Mithrandir
Colaborador
 
Fecha de Ingreso: abril-2003
Mensajes: 12.106
Antigüedad: 21 años
Puntos: 25
No dices que manejador utilizas, pero por ejemplo, en TSQL (SQL Server) lo haces asi:
Código:
Select (IsNull(sup1_num, 0)+IsNull(sup2_num, 0)+IsNull(sup3_num, 0)) AS m2
FROM propiedades
Mientras que en MySQL lo haces con:
Código:
Select (Coalesce(sup1_num, 0)+Coalesce(sup2_num, 0)+Coalesce(sup3_num, 0)) AS m2
FROM propiedades
__________________
"El hombre, en su orgullo, creó a Dios a su imagen y semejanza."
Friedrich Nietzsche