result coming twice , no conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mans
    New Member
    • Feb 2014
    • 2

    result coming twice , no conversion

    Hi,
    I have tried to convert upper to lower and lower to upper in single string it's coming but not with same.

    select upper(substr('m aN',0,3))||lowe r(substr('maN', 3)) from dual;
    Result:

    UPPER(
    ------
    MANn

    but it should come like 'MAn'
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    That's because your first substring is returning 3 characters.

    Comment

    • Mans
      New Member
      • Feb 2014
      • 2

      #3
      Rabbit, i am trying to get my result like convert upper to lower and lower to upper in same string
      example : select 'AbcDEfgH' from dual;
      and i am expecting result as
      output: aBCdeFGh
      all lower convert to upper and upper convert to lower.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        If you're trying to flip the cases, then you can't do it with just upper and lower. You'll need to create a function to loop through each character.

        Comment

        Working...