Re: [SQL] select a part of a name - Mailing list pgsql-sql

From Moray McConnachie
Subject Re: [SQL] select a part of a name
Date
Msg-id 003401bf419c$58826f30$760e01a3@oucs.ox.ac.uk
Whole thread Raw
In response to Re: [SQL] select a part of a name  (<kaiq@realtyideas.com>)
Responses Re: [SQL] select a part of a name  (neko@kredit.sth.szif.hu)
List pgsql-sql

> use: where name like '%names%'

Except that the user specified he wanted to be able to find Tom Jones
and jonas from the search text jon, so you either need to use:

where lower(name) like ('%' ¦¦ lower(searchtext) ¦¦ '%')

or something similar, which is slow unless you have an index on
lower(name), and even then.
Or you use the regexp search ~* given previously.

----------------------------------------------------------------------
----------------
Moray.McConnachie@computing-services.oxford.ac.uk




pgsql-sql by date:

Previous
From:
Date:
Subject: Re: [SQL] select a part of a name
Next
From: John C Cusick
Date:
Subject: Re: [SQL] Getting last used oid