Re: Reverse pattern matching

From: Tony Andrews <andrewst_at_onetel.com>
Date: 18 May 2005 10:04:51 -0700
Message-ID: <1116435891.721420.117410_at_g47g2000cwa.googlegroups.com>


Jonathan Leffler wrote:
> In IBM Informix Dynamic Server (IDS), you'd do:
>
> SELECT b FROM t WHERE 'XYZ' LIKE a;

The solution is the same in Oracle:

SQL> select * from t;

A                   B
---------- ----------
AB%                 1
X%                  2
XY%                 3
%                   4

SQL> select * from t where 'XYZ' like a;

A                   B
---------- ----------
X%                  2
XY%                 3
%                   4
Received on Wed May 18 2005 - 19:04:51 CEST

Original text of this message