Data Mask SQL

 
 

Substitute.RandomNumber

Sample SQL...

/*===================================================================================
 Mask Type: Substitute.RandomNumber
=====================================================================================*/
/*---------------------------------------------------------------------
Table: [Protected Personal Information]
Column: [Salary]
Mask:
* Type: 'Substitute: Random Number...'
* Params: '20000|150000'
* Category: 'Substitute' - overwrite all rows with a "random" value
* Descrip: This mask overwrites each row with a random number between the minimum
           and maximum limits you specify as parameters.

---------------------------------------------------------------------*/
UPDATE [Protected Personal Information]
SET [Salary] = 20000
  + FLOOR((CAST(ABS(CHECKSUM(NEWID())) AS FLOAT) / 2147483648) * (150000 - 20000))

 

eXTReMe Tracker