From: | Hellmuth Vargas <hivs77(at)gmail(dot)com> |
---|---|
To: | Patricio Gigoux <pgigoux(at)munistgo(dot)cl> |
Cc: | Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: comparar registro con un array |
Date: | 2013-04-11 21:11:54 |
Message-ID: | CAN3Qy4oYdU0CZxRW-ioCztXeiPfL+FR9fnRXeuYv=3t9ygkgWg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Hola lista
creo que es:
SELECT * FROM la_tabla WHERE id = ANY(array['a','d','e'])
donde id debe ser de tipo carácter.
ejemplo
select *
from (values(0,5,222),(6,20,223),(21,180,224),(181,181,225)) as
d(dias_inicial,dias_final,lista)
where dias_inicial = any(array[0, 21]);
El 11 de abril de 2013 15:30, Patricio Gigoux<pgigoux(at)munistgo(dot)cl> escribió:
> ¿Como puedo comparar con un array en una condición, algo como:
> Salect * from la_tabla where id= a algún elemento en ARRAY['a','d','e']
> es decir, si el id corresponde a alguno de esos elementos es seleccionado
>
> Gracias
>
>
> Patricio Ggoux Méndez
> Contact Me [image: Twitter] <http://@pgigoux>
> [image: My QR VCard]
> Want a signature like mine?
> <http://r1.wisestamp.com/r/landing?promo=22&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_22> Click
> here.<http://r1.wisestamp.com/r/landing?promo=22&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_22>
>
>
--
Cordialmente,
Ing. Hellmuth I. Vargas S.
Esp. Telemática y Negocios por Internet
Oracle Database 10g Administrator Certified Associate
From | Date | Subject | |
---|---|---|---|
Next Message | Raul Andres Gutierrez Alejo | 2013-04-11 21:12:26 | Re: comparar registro con un array |
Previous Message | Patricio Gigoux | 2013-04-11 20:30:58 | comparar registro con un array |