Re: SQL substring

From: Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar>
To: Guy Korland <korland(at)cs(dot)Technion(dot)AC(dot)IL>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL substring
Date: 2003-11-12 14:38:31
Message-ID: 1068647911.4251.3.camel@taz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

... 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
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2003-11-12 15:13:58 Re: SQL substring
Previous Message Guy Korland 2003-11-12 14:07:04 SQL substring