From: | Kevin Waterson <kevin(at)oceania(dot)net> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | SELECT woes |
Date: | 2003-09-02 07:51:33 |
Message-ID: | 20030902175133.199bdbc0.kevin@oceania.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I wish to SELECT * FROM testTable WHERE any field contains any word in the
string "my name is bill"
All I can come up with is this.
SELECT * FROM testTable WHERE testfeild LIKE '%my%' OR testfield2 LIKE '%my%' OR testfeild LIKE '%name%' OR testfield2 LIKE '%name%' OR testfeild LIKE '%is%' OR testfield2 LIKE '%is%' OR testfeild LIKE '%bill%' OR testfield2 LIKE '%bill%'
Is there a better/more efficient way?
Kind regards
Kevin
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Waterson | 2003-09-02 09:58:29 | Re: SELECT woes |
Previous Message | Jeffrey Melloy | 2003-09-02 07:34:27 | Re: SELECT woes |