Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to mask data of the table Column

Venkat DFeb 20 2018 — edited Feb 20 2018

Hi Team,

I have a production database table emp. Now I want to mask empno column.

Example:

Acual Data in the EMP table:

-----------------------------------

EMPNO: 0000123456789

I want like a "000XXXX789"

Please suggest.

Actully, I have one query, But i am not understand that query.

update EMP set EMPNO=substr(EMPNO,1,5) || regrep_replace(substr(EMPNO,6,5),'[0-9]',9)

||substr(EMPNO,11,5) || regrep_replace(substr(EMPNO,16,5),'[0-9]','9') || substr(EMPNO,21,5);

Note: dataabse Version is 11g.

Thanks,

Raman....

This post has been answered by Frank Kulash on Feb 20 2018
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 20 2018
Added on Feb 20 2018
22 comments
4,932 views