If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > LIKE operator without specifying wildcard char

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-08, 06:54
murty murty is offline
Registered User
 
Join Date: Aug 2006
Posts: 3
LIKE operator without specifying wildcard char

We are trying to upgrade our database from Oracle 9i to 10g.

We have a CHAR(30) column in a table.


When we perform string comparisons using '=' operator (Eg.....where
col = 'XYZ' ) the trailing spaces are ignored, which is perfectly
fine (both in 9i & 10g).


When we use LIKE operator without specifying any wildcard char in
Oracle 9i (Eg.....where col like 'XYZ'), the trailing spaces are
being ignored and so the behavior of "LIKE without wildcard char" is
identical to direct '=' operator. But in 10g, the trailing spaces in
the column value are making a difference.


I know that it doesn't make much sense to use LIKE operator when there
is no wildcard char but the SQL is dynamically generated based on some
complex conditions in the app.


So my question is what is the expected behaviour of LIKE operator on
CHAR column with regard to trailing spaces when there is no wildcard
character?


Is it possible to simulate 9i behavior in 10g by setting any config
param ?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On