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

Código mysql:
Ver original
  1. UPDATE (select tel1 from contactos union select tel2 from contactos) as c INNER JOIN
  2. (SELECT t1.tel1 as tel, count(t1.tel1) as repetidos
  3. FROM (select tel1 from contactos union select tel2 from contactos)t1
  4. GROUP BY t1.tel1)t2
  5. ON t2.tel = c.tel1
  6. SET contactos.telefonos_repetidos = t2.repetidos;

Está tampoco la he probado
__________________
Without data, You are another person with an opinion.
W. Edwads Deming