1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Query for scenario

Discussion in 'SQL PL/SQL' started by johnchennai, Dec 26, 2013.

  1. johnchennai

    johnchennai Active Member

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    100
    query to print the following

    Input String:12341234123123456

    OutputString:abcdabcdabcabcdef
     
  2. yowancristo

    yowancristo Forum Advisor

    Messages:
    103
    Likes Received:
    10
    Trophy Points:
    305
    Location:
    Bangalore
    Hi,

    TRANSLATE function has to be used for this.

    Code (SQL):

    SELECT  TRANSLATE('12341234123123456','123456','abcdef')    output
    FROM    DUAL;
     
    Regards,
    Yowan Cristo