Ver Mensaje Individual
  #11 (permalink)  
Antiguo 24/09/2009, 08:54
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 3 meses
Puntos: 360
Respuesta: conteo de telefonos repetidos en 2 columnas.

esta parece que sí:

Código mysql:
Ver original
  1. UPDATE contactos c INNER JOIN
  2. (SELECT t1.tel tele, count(t1.tel) as repetidos
  3. FROM (select tel1 tel from contactos union all select tel2 from contactos)t1
  4. group by t1.tel)t2
  5. ON t2.tele = c.tel1 SET c.telefonos_repetidos = t2.repetidos;
__________________
Without data, You are another person with an opinion.
W. Edwads Deming