Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2352
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 Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am
No new posts Unloading DB2 table in CSV format alo... grvtomar COBOL Programming 7 Sun Jan 28, 2018 2:05 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us