I am creating a stored procedure in Oracle where I am required to mask employee ID in the SELECT statement.
I would like that the same masking number be applied to the all the rows with the same Employee ID.
EMP_ID MASK_ID
------ -------
212 USER9293
443 USER6474
212 USER9293
Currently in my MSSQL SELECT I accomplish this by:
CONCAT(‘USER’, CONVERT(NVARCHAR(6), (1.0 + FLOOR(250000 * RAND(CONVERT(VARBINARY, EMP_ID))))))
I would like to accomplish a similar solution in Oracle. I believe a SEED using DBMS_RANDOM would probably get me close but I am not sure how to pass the column in as it return an error every time.
Any tips?