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

Home -> Community -> Usenet -> c.d.o.tools -> Re: ?? change wildcard character from '%' to '*'

Re: ?? change wildcard character from '%' to '*'

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/08/08
Message-ID: <8mocku$sid$1@s1.read.news.oleane.net>#1/1

You can use the translate function something like:

select * from t1, t2, t3
where t1.col1 = t2.col2
  and t1.col3 like translate(t3.col3,'*','%');

--
Have a nice day
Michel


<subai_at_hotmail.com> a écrit dans le message : 8mn4k4$ioo$1_at_nnrp1.deja.com...

> Hi Gurus,
> Does anyone know how to change the ODBC multiple character wildcard
> character from '%' to '*'? So that, using ODBC, I can send an SQL
> statement like "select * from table1 where column1 like 'ABC*' " that
> returns all rows that have values start with 'ABC' in column1. Can we
> do it through SQLSetStmtAttr? Or any other solutions?
>
> The reason I ask this is because in a certain table, I have a column
> that has strings contain '*' as wildcard character, and I am trying to
> joint this table with another table using this column, e.g.:
>
> "select * from t1, t2, t3 where t1.col1 = t2.col2 and t1.col3 like
> t3.col3"
> t3.col3 contains these wildcard strings that match the strings from
> t1.col3.
>
> I was trying to see if CREATE TRANSLATION could help to translate '*'
> to '%', but this SQL command is not support by any major DBMS (like
> Oracle, Sybase,..).
>
>
> Thanks so much for the help in advance!!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Aug 08 2000 - 00:00:00 CDT

Original text of this message

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