| From: | Javier Chávez B(dot) <jchavezb(at)gmail(dot)com> |
|---|---|
| To: | "Juan Jose Rosales Rodriguez" <jjrosales(at)estudiantes(dot)uci(dot)cu> |
| Cc: | hermeszambra(at)yahoo(dot)com, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Juan Ramirez" <juanrmiranda(at)hotmail(dot)com>, "PostGreSQL Lista de Ayuda" <pgsql-es-ayuda(at)postgresql(dot)org> |
| Subject: | Re: Ayuda con query |
| Date: | 2009-01-15 16:51:37 |
| Message-ID: | ded64bba0901150851l5860c5b9rda6a6a37c09a0092@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
2009/1/15 Juan Jose Rosales Rodriguez <jjrosales(at)estudiantes(dot)uci(dot)cu>:
> Buenas tardes tengo orto problemita
>
> Quiero sacar lod datos duplicados de un campo
> algo asi
>
>
> Nombre| Edad |SEXO
> ------- -|---------|------------
> JUAN | 12 | M
> OMAR| 13 | M
> JUAN | 12 | M
> JUAN | 12 | M
> JUAN | 12 | M
> JUAN | 12 | M
> pepe | 12 | M
> pepe | 12 | M
> pepe | 12 | M
>
> y da como result si busca por nombre el duplicado quedaria asi
>
> Nombre| Edad |SEXO
> ------- -|---------|------------
> JUAN | 12 | M
> JUAN | 12 | M
> JUAN | 12 | M
> JUAN | 12 | M
> JUAN | 12 | M
> pepe | 12 | M
> pepe | 12 | M
> pepe | 12 | M
>
>
> Gracias dde antemano.
> saludos.
> --
> TIP 1: para suscribirte y desuscribirte, visita http://archives.postgresql.org/pgsql-es-ayuda
>
Select distinct(Nombre) from <tu:_tabla> siempre y cuando sea el mismo
id si no porque tienes un campo en tu consulta que hace que tu select
entregue eso...
slds.
J
--
Cumprimentos
jchavez
linux User #397972 on http://counter.li.org/
Natalie Wood - "The only time a woman really succeeds in changing a
man is when he is a baby."
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gilberto Castillo Martínez | 2009-01-15 17:00:03 | Re: Ayuda con query |
| Previous Message | Juan Jose Rosales Rodriguez | 2009-01-15 16:51:09 | Constrains + Catalogo |