X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0ED8B52909 for ; Fri, 5 Aug 2005 06:46:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56109-08 for ; Fri, 5 Aug 2005 09:46:52 +0000 (GMT) Received: from mra02.ch.as12513.net (mra02.ch.as12513.net [82.153.252.24]) by svr1.postgresql.org (Postfix) with ESMTP id 39DB7528DD for ; Fri, 5 Aug 2005 06:46:50 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mra02.ch.as12513.net (Postfix) with ESMTP id 50866D4B8D for ; Fri, 5 Aug 2005 10:46:52 +0100 (BST) Received: from mra02.ch.as12513.net ([127.0.0.1]) by localhost (mra02.ch.as12513.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15283-01-89 for ; Fri, 5 Aug 2005 10:46:50 +0100 (BST) Received: from [10.0.0.151] (unknown [81.5.146.249]) by mra02.ch.as12513.net (Postfix) with ESMTP id 0564FD4B68 for ; Fri, 5 Aug 2005 10:46:45 +0100 (BST) Message-ID: <42F33585.1090706@rkcomputing.co.uk> Date: Fri, 05 Aug 2005 10:46:45 +0100 From: Rob Kirkbride User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: 'select where' using multiple columns. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by Eclipse VIRUSshield at eclipse.net.uk X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200508/21 X-Sequence-Number: 22249 Hi, I've googled around for this but can't see a decent way of doing this : I've got a persons name which is being stored say in 3 columns :- Title, Forename_1, Forename_2, Surname. I want to allow a search say for 'John Smith'. Problem is I can't just break it up into forename and surname because I won't also know. Is there a way to do something like a 'select * where forename_1,forename_2,surname like '%String%' ?? Thanks for any help. Apologies if its a FAQ. Rob