Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LIKE Operator
Message
General information
Forum:
Oracle
Category:
Other
Title:
Miscellaneous
Thread ID:
01372405
Message ID:
01372616
Views:
18
Mark:

Do you know if there is a setting in Oracle that would ignore the trailing spaces using the LIKE operator? My expertise of Oracle is limited, but I have a client with an Oracle install that returns zero records for the following command:

SELECT * FROM VW_PERSON_PROFILE_BY_NAME WHERE UPPER(FULL_NM) LIKE 'TESTLAST, DALE W'

However, at our office the same command will return one record. In other words, our install of Oracle ignores the trailing spaces.

I can fix this by always adding the % to the end of the string inside our business layer, but I wanted to know why one Oracle site behaves differently than the other.

Thanks!

--Paul

>The Oracle wild cards for the LIKE operator are % and _ (underscore). The percent sign is like an asterisk while the underscore is position wildcard
>
>LIKE 'TESTLAST%' returns all matches that start with TESTLAST
>
>LIKE '%LAST%' returns any rows with LAST anywhere in the string.
>
>
>>Hi:
>>
>>I have two Oracle databases, one is at the client site and the other is at our office. Both are populated with the same tables and data.
>>
>>I run the following SQL command in enterprise manager:
>>
>>SELECT * FROM VW_PERSON_PROFILE_BY_NAME WHERE UPPER(FULL_NM) LIKE 'TESTLAST, DALE W'
>>
>>At our office, the results return one record, but on the client site the result returns zero records. Is there a setting in Oracle that would cause the LIKE operator to behave differently?
>>
>>Thanks!
>>
>>--Paul
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform