From: Franco Bruno Borghesi <franco@akyasociados.com.ar>
To: Guy Korland <korland@cs.Technion.AC.IL>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL substring
Date: Wed, 12 Nov 2003 11:38:31 -0300
Message-ID: <1068647911.4251.3.camel@taz> (raw)
In-Reply-To: <00ea01c3a926$4049b6d0$4a264484@cs.technion.ac.il>
References: <00ea01c3a926$4049b6d0$4a264484@cs.technion.ac.il>
... WHERE field1 LIKE '%' || field2 || '%'
or
... WHERE position(field2 in field1)>0
On Wed, 2003-11-12 at 11:07, Guy Korland wrote:
> Hi,
> How can I compare two fields if one is a substring of the other?
> Something like:
> ... WHERE StringA like '%' + StringB + '%';
>
> Thanks,
> Guy Korland
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: franco@akyasociados.com.ar, korland@cs.Technion.AC.IL
Subject: Re: SQL substring
In-Reply-To: <1068647911.4251.3.camel@taz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox