Re: Is it possible to search for sub-strings...

From: Steve Heaven <steve(at)thornet(dot)co(dot)uk>
To: John Draper <crunch(at)webcrunchers(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it possible to search for sub-strings...
Date: 2000-09-19 10:44:26
Message-ID: 3.0.1.32.20000919114426.0072246c@mail.thornet.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 05:27 19/09/00 -0500, John McKown wrote:
>Assuming that the name of the table is "test1" and the variable containing
>the values of interest is name "values", then:
>
>SELECT * FROM test1 WHERE values LIKE 'JYR%';

or
select * from test1 where values ~ '^JYR';

or for case insensitive:
select * from test1 where values ~* '^JYR';

Steve

--
thorNET - Internet Consultancy, Services & Training
Phone: 01454 854413
Fax: 01454 854412
http://www.thornet.co.uk

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2000-09-19 10:51:03 Controlling the generated plan better
Previous Message Andrew.Mason 2000-09-19 10:40:41 Re: Is it possible to search for sub-strings...