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
Collapse
X
-
Tags: None
-
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.Comment
-
Comment
-
syed naseema -
answer
Select ename,lower(sub str(ename,1,rou nd(length(ename )/2)))||upper(sub str(ename,round (length(ename)/2)+1,length(ena me))) a from emp ;Comment
-
Select ename,lower(sub str(ename,1,rou nd(length(ename )/2)))||upper(sub str(ename,round (length(ename)/2)+1,length(ena me))) a from emp ;
executed....... ..............Comment
Comment