| Usuario |
COSULTA SIMPLE? NO LO CREO... |
Desconocido
|
| Enviado - 8/10/2004 |
| |
POR FAVOR ESTOY DESESPERADO PARECE UNA CONSULTA MUY SIMPLE PERO NO ENCUENTRO LA SOLUCION... TENGO UN LISTADO DE CONTACTOS CON DOS CAMPOS NOMBRE Y DIRECCION DE EMAIL, PUEDE OCURRIR QUE EL NOMBRE SEA DISTINTO Y EL EMAIL SEA EL MISMO.. PUES YO QUIERO QUE EN UNA CONSULTA ME APAREZCAN LOS DOS CAMPOS SIN REPETICIONES DE EMAIL. POR EJEMPLO:
TABLA CONTACTOS:
NOMBRE--- EMAIL
[email protected]
[email protected]
[email protected]
EL RESULTADO DE LA QUERY QUE QUIERO ES:
NOMBRE--- EMAIL
[email protected]
[email protected]
AYUDADME POR FAVOR!!. |
| |
|
amm481
1 Mensaje(s) |
| Enviado - 11/10/2004 |
| |
| Has probado con "SELECT DISTINCT campo_unico FROM tabla". Con distinct no repite los campos. |
| |
|
Desconocido
|
| Enviado - 30/10/2004 |
| |
Parece que debes de agrupar por el campo email y hacer un first del nombre, para lograr esa consulta en especifico, seria...
select first( nombre ), email
from tabla_contactos
group by email
/
Algo asi...
:wq |
| |
|