Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> SQL string matching

SQL string matching

From: abracad <abracad_at_hotmail.com>
Date: 8 Mar 2003 16:03:41 -0800
Message-ID: <94e19a8d.0303081603.1ddf2d69@posting.google.com>


I am trying to create a SQL query that will search a text field for a particular word, say 'tin'. I want to ensure it finds only the word
'tin', and not the characters 'tin' as part of another word, eg
'postings'.

I can create a query such as:
SELECT desc
FROM Table1
WHERE desc LIKE '% tin %' OR desc LIKE 'tin %' OR desc LIKE '% tin' OR desc='tin'

But is there a shorter or more efficient way of accomplishing the same objective?

Thanks in advance Received on Sat Mar 08 2003 - 18:03:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US