Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Searching lower case in a table with LIKE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Searching lower case in a table with LIKE
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: 2238
Location: @my desk

PostPosted: Thu Dec 25, 2008 12:08 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Summing on Mixed Case Literals Roy Ware SYNCSORT 3 Tue Jan 03, 2017 10:18 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us