RE: Guion bajo

From: arturo garcia <josearturogarcia(at)hotmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: RE: Guion bajo
Date: 2006-11-30 21:49:24
Message-ID: BAY124-W43B0A5CEE03D146DA62F08CCDB0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Ya lo había hecho así:
SELECT * FROM tipos WHERE descripcion LIKE '%\_'

Pero algo pasa que me devuelve todos los registros sin importar el caracter de escape. Al principio pensé que era algún bug del pg_admin III 1.6, pero despues lo probé en modo caracter y los resultados fueron los mismos, me devuelve todos los registros.
Sigo con la duda, sorry.

> Date: Thu, 30 Nov 2006 15:34:54 -0300> From: alvherre(at)commandprompt(dot)com> To: josearturogarcia(at)hotmail(dot)com> CC: pgsql-es-ayuda(at)postgresql(dot)org> Subject: Re: [pgsql-es-ayuda] Guion bajo> > 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> > ---------------------------(fin del mensaje)---------------------------> TIP 5: ¿Has leído nuestro extenso FAQ?> > http://www.postgresql.org/files/documentation/faqs/FAQ.html
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2006-11-30 22:09:37 Re: Guion bajo
Previous Message Agustin Casiva 2006-11-30 21:46:36 Re: sincronizar 2 bd posgresql