Received: from oxmail.ox.ac.uk (oxmail1.ox.ac.uk [129.67.1.1]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA05883 for ; Wed, 8 Dec 1999 11:54:37 -0500 (EST) (envelope-from moray.mcconnachie@computing-services.oxford.ac.uk) Received: from ermine.ox.ac.uk ([163.1.2.13]) by oxmail.ox.ac.uk with esmtp (Exim 2.10 #1) id 11vkIW-0004WE-00; Wed, 8 Dec 1999 16:50:36 +0000 Received: from ermine.ox.ac.uk ([163.1.2.13] helo=moraypc ident=root) by ermine.ox.ac.uk with smtp (Exim 2.12 #1) id 11vkIW-0005KC-00; Wed, 8 Dec 1999 16:50:36 +0000 Message-ID: <003401bf419c$58826f30$760e01a3@oucs.ox.ac.uk> From: "Moray McConnachie" To: , "Vladimir Terziev" Cc: "Fred Schoonewille" , References: Subject: Re: [SQL] select a part of a name Date: Wed, 8 Dec 1999 16:50:34 -0000 Organization: Oxford University MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > 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