Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Wildcards in varchar column
Hendrik Lampert <henhouse_at_gmx.net> wrote:
> i want to compare varchar fields of 2 tables.
> Content of Field_A table A: ?bc?e*
> Content of Field_B table B: abcdefghi
> Result should be: Field_A matches Field_B
> The characters of Field_A should be interprated as wildcards '?' (one char)
> and '*' (anything else).
SELECT A.Field_A, B.Field_B
FROM A, B
WHERE B.Field_B LIKE translate(A.Field_A,'?*','_%');
Greetings,
LW
Received on Tue May 27 2003 - 09:35:41 CDT