Saturday, April 10, 2010

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

SELECT ename,
LOWER (SUBSTR (ename, 1, ROUND (LENGTH (ename) / 2)))
|| UPPER (SUBSTR (ename, ROUND (LENGTH (ename) / 2) + 1, LENGTH (ename)))
a
FROM emp;