Hi,
As anybody used UDF or sql expression for masking data.Can you pls give me some insight.
I am masking the credit card number column and requirement is to retain the first 6 digits and last 4 digits and mask the in between 6 digits.Below is the sql expression which i plan to use.
SQL> select substr(card_no, 1, 6)||replace(substr(card_no,7,6),substr(card_no,7,6),'999999')||substr(card_no,-4) from credit_card_info1;
SUBSTR(CARD_NO,1,6)||REPLACE(SUBSTR(CARD_NO,7,6),SUBSTR(CARD_NO,7,6),'999999')||
--------------------------------------------------------------------------------
1285149999999848
7844899999994154
8554889999991228
9487549999998932
1285149999999848
7844899999994154
8554889999991228
9487549999998932
9487549999998932
9487549999998932
9487549999998932
11 rows selected.
SQL> select * from tctdbs.credit_card_info1;
CUST_ID ENROLL_DA CARD_NO EXP_DATE
---------------- --------- ---------------- ---------
1000 30-MAR-17 1285145836589848 30-MAR-20
1001 30-MAR-17 7844896487984154 30-MAR-20
1002 30-MAR-17 8554884663181228 30-MAR-20
1003 30-MAR-17 9487545796548932 30-MAR-20
1004 31-MAR-17 1285145836589848 31-MAR-20
1005 31-MAR-17 7844896487984154 31-MAR-20
1006 31-MAR-17 8554884663181228 31-MAR-20
1007 31-MAR-17 9487545796548932 31-MAR-20
1008 31-MAR-17 9487545796548932 31-MAR-20
1009 31-MAR-17 9487545796548932 31-MAR-20
1010 31-MAR-17 9487545796548932 31-MAR-20
11 rows selected.
SQL>
Can somebody tell me how do i incorporate the same in data masking thru EM and mask the data successfully.
Regards/vinay