Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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

Reply
 
LinkBack Thread Tools Search this Thread 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 Search this Thread
Search this Thread:

Advanced Search
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

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