472,090 Members | 1,304 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,090 software developers and data experts.

sql query to display half employee name in upper case & other half in lower case

sql query to display half employee name in upper case & other half in lower case
Jul 27 '10 #1
6 31405
rski
700 Expert 512MB
Show what do you have so far (I think you tried do it by yourself).
BTW
What is a first half in name 'Joe'?
Jul 27 '10 #2
OraMaster
135 100+
@itishree priyadarsini
Let say there are 100 records in employee table. So you want to display first 50 record's employee name in UPPERCASE and remaing 50 in lowercase? Am I right?
And also tell me what if total number of records are in odd like 101 or 99.
Aug 2 '10 #3
amitpatel66
2,367 Expert 2GB
Are you looking at displaying firstname of an employee in Upper case and second name in lower?
Aug 2 '10 #4
Try this query:

select upper(substr(ename,0,3))||lower(substr(ename,3)) from emscs
Oct 22 '10 #5
Select ename,lower(substr(ename,1,round(length(ename)/2)))||upper(substr(ename,round(length(ename)/2)+1,length(ename))) a from emp ;
Jan 10 '12 #6
Select ename,lower(substr(ename,1,round(length(ename)/2)))||upper(substr(ename,round(length(ename)/2)+1,length(ename))) a from emp ;
executed.....................
Jan 10 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by lowellturner | last post: by
17 posts views Thread by Janice | last post: by
19 posts views Thread by Eric Lindsay | last post: by
9 posts views Thread by B Williams | last post: by
5 posts views Thread by cfmx2008 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.