Re: LIKE multiple

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Gregorio Diaz <gregorio_diaz(at)yahoo(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: LIKE multiple
Date: 2006-09-15 02:43:14
Message-ID: 20060915024314.GZ525@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Gregorio Diaz escribió:
> Hola lister(at)s
>
> Alguien sabe porque esto no funciona:
>
> SELECT nombre FROM personas WHERE nombre LIKE ('gr%',
> 'al%', 'pe%')

Porque no es legal segun SQL. Esto si:

select * from personas where nombre any ~~ (array['gr%', 'al%', 'pe%']);

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2006-09-15 03:11:34 Re: LIKE multiple
Previous Message Gustavo Garay 2006-09-15 02:22:19 Re: LIKE multiple