Re: SQL substring

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar>
Cc: Guy Korland <korland(at)cs(dot)Technion(dot)AC(dot)IL>, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL substring
Date: 2003-11-12 15:13:58
Message-ID: 20031112151358.GA30248@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Nov 12, 2003 at 11:38:31 -0300,
Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar> wrote:
> ... WHERE field1 LIKE '%' || field2 || '%'

The first way won't work correctly if field2 has %s in it.

> or
> ... WHERE position(field2 in field1)>0

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2003-11-12 21:17:46 Re: transaction processing after error in statement
Previous Message Franco Bruno Borghesi 2003-11-12 14:38:31 Re: SQL substring