From: "Michel Cadot" <micadot@netcourrier.com>
Subject: Re: ?? change wildcard character from '%' to '*'
Date: 2000/08/08
Message-ID: <8mocku$sid$1@s1.read.news.oleane.net>#1/1
References: <8mn4k4$ioo$1@nnrp1.deja.com>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@oleane.net
X-Trace: s1.read.news.oleane.net 965719518 29261 195.101.229.231 (8 Aug 2000 07:25:18 GMT)
Organization: Guest of France Telecom Oleane's newsreading service
Reply-To: "Michel Cadot" <micadot@netcourrier.com>
NNTP-Posting-Date: Tue, 8 Aug 2000 07:25:18 +0000 (UTC)
Newsgroups: comp.databases.oracle.misc


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@hotmail.com> a écrit dans le message : 8mn4k4$ioo$1@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.




