Delphix Products

 View Only
  • 1.  Masking last characters with *

    Posted 02-01-2016 11:04:00 AM
    Hi all,

    I'm trying to mask last 4 digits of the telephone numbers. Due to the no fixed length of the telephone numbers, I can't use segment mapping relying on the segment length. How can I substitute the last 4 digits independently from the length of the value?

    Let me write some sample values and what I'd like to obtain:

    Original values to mask:

    What I'd like to get:

    Any help would be sincerely appreciated.


  • 2.  RE: Masking last characters with *
    Best Answer

    Posted 02-03-2016 06:32:00 PM
    The easiest way would be to put this in a post script.  Something like update table set phone= SUBSTR(phone,1,legnth(phone)-4+"****".  This might not be the exact SQL

  • 3.  RE: Masking last characters with *

    Posted 02-03-2016 10:38:00 PM
    Thank you. I'm gonna in this direction even though I'd like to know if someone else dealt with this case in another way.

    Best Regards.