IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching lower case in a table with LIKE


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Thu Dec 25, 2008 7:53 am
Reply with quote

We have a column in a table that has names of clients.

For ex: xyz PVT ltd

The data is freeform and has both lower and upper case mixed in the field
I am searching for the string xyz in this column

When I submit the query:
SELECT * FROM QUAL.TABLENAME WHERE COl1 LIKE ('%xyz%')

It does not return any rows though the data is present.

I am wondering if QMF defaults xyz to XYZ and fails to find it.I found the hex value of xyz but dont know to write the LIKE statement with a hex value as search string.

Please let me know if this query is failing because QMF is defaulting the search string to upper case.I am not sure if DB2 is case sensitive but the hex values of xyz and XYZ are not same as i see it.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Dec 25, 2008 12:08 pm
Reply with quote

morpheus007,

We dont have QMF here. But in File-Aid/DB2 we have a similar option like this.
Code:
Lowercase Support for Data in Browse/Edit/SQL Analysis                   
  Data is converted to uppercase                 ===> OFF     (ON or OFF)

I think you might need to check your DEFAULT QMF settings rather than correcting the SQL. There is nothing wrong in the sql as long as you are searching for a lower case 'xyz' in the column.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top