on ‎2023 Aug 16 8:01 PM
I have a scenario where the data has to be randomized before hitting the DB tables for sensitive data fields like SSN, Salary ,AccountInfo as well as User details .Can I use the RAND () functionto do this ? Is it possible to do RAND on Date, NVARCHAR and string fields? If so, can someone help me here with syntax? Thank you.
Request clarification before answering.
Hi sreepriyag,
RAND you can do directly for numbers.
For dates you can user RAND together with ADD_DATE
For NVARCHAR you can concatenate with RAND converted to string and function HASH_256
The important point here is to see the results and check if someone can't reverse to the original number, sometimes just put *** is ok too.
Regards, Fernando Da Rós
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.