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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itishree priyadarsini
    New Member
    • Jul 2010
    • 1

    #1

    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
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Show what do you have so far (I think you tried do it by yourself).
    BTW
    What is a first half in name 'Joe'?

    Comment

    • OraMaster
      New Member
      • Aug 2009
      • 135

      #3
      Originally posted by itishree priyadarsini
      sql query to display half employee name in upper case & other half in lower case
      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

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Are you looking at displaying firstname of an employee in Upper case and second name in lower?

        Comment

        • syed naseema

          #5
          Try this query:

          select upper(substr(en ame,0,3))||lowe r(substr(ename, 3)) from emscs

          Comment

          • KARTHIK1244
            New Member
            • Jan 2012
            • 2

            #6
            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

            • KARTHIK1244
              New Member
              • Jan 2012
              • 2

              #7
              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

              Working...