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

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

Re: SQL string matching

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Sun, 09 Mar 2003 09:02:34 +0200
Message-ID: <3E6AE70A.6070408@atbusiness.com>


abracad wrote:

>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?
>

You could try this:

SELECT desc
FROM Table1
WHERE ' '||desc||' ' LIKE '% tin %';

regards,
Lauri Pietarinen Received on Sun Mar 09 2003 - 01:02:34 CST

Original text of this message

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