Re: Guion bajo

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: arturo garcia <josearturogarcia(at)hotmail(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Guion bajo
Date: 2006-11-30 18:34:54
Message-ID: 20061130183454.GE19218@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

arturo garcia escribió:

> SELECT * FROM tipos WHERE descripcion LIKE '%_'
>
> Sin embargo, al ejecutar el query, me devuelve todos los registro que
> contiene la tabla, sin importar el criterio de selección. Que puedo
> hacer para seleccionar solo lo que me interesa???

Leer el manual

http://www.postgresql.org/docs/8.1/static/functions-matching.html#FUNCTIONS-LIKE

To match a literal underscore or percent sign without matching
other characters, the respective character in pattern must be
preceded by the escape character. The default escape character
is the backslash but a different one may be selected by using
the ESCAPE clause. To match the escape character itself, write
two escape characters.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

  • Guion bajo at 2006-11-30 17:26:02 from arturo garcia

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2006-11-30 18:37:42 Re: Activating procedural lenguages...
Previous Message lucas 2006-11-30 18:34:34 Activating procedural lenguages...