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
 
Extract records having Values in lower case for some columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Wed Oct 19, 2005 2:24 pm    Post subject: Extract records having Values in lower case for some columns
Reply with quote

Hi,
can we extract records from db2 table having values in a perticular column in lower case?

If yes what is the query used for it?

regards,
amol
Back to top
View user's profile Send private message

balu_ver2k5

New User


Joined: 17 Oct 2005
Posts: 2

PostPosted: Wed Oct 19, 2005 4:44 pm    Post subject: Use Scalar Function Lcase
Reply with quote

Hi Umed

Example query

Select * from MASTER WHERE EMP_NAME=LCASE('UMED')


let me know if u cant understand
Back to top
View user's profile Send private message
swapnilverma

New User


Joined: 10 Oct 2005
Posts: 4
Location: bangalore,india

PostPosted: Wed Oct 19, 2005 4:51 pm    Post subject:
Reply with quote

Quote:
select ename from emp where upper(ename)=&ename;

or else

select ename from emp where ename=lower(&ename)


plz revert if its not work ......


Enjoy!!!! icon_biggrin.gif icon_wink.gif
Quote:
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Wed Oct 19, 2005 5:08 pm    Post subject:
Reply with quote

Hi ,

Its not working. i m explaining the problen in details

suppose we have following table :

Name salary
------------ ----------------
amol 100
Umed 200
RAM 300
Mohan 400
Sham 200
JON 100

Here i need to extract following rows as they do not contain
all capital letters in Name column :

amol 100
Umed 200
Mohan 400
Sham 200

can we do this using a single Query.
We have to process thousands of such records.

regards,
Umed
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Nov 25, 2005 6:42 am    Post subject: Re: Extract records having Values in lower case for some col
Reply with quote

I?m sure you have already solved this, or no longer have the need.

SELECT NAME, SALARY
FROM EMP
WHERE NAME <> UCASE(NAME)

This should select any row where any character in name is not upper case
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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am

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