DataScramble - Randomizing data rows
- Joel Lipman
- Transact-SQL
- Hits: 7457
Along with my DataJumble function and DataTumble procedure which also help scramble database tables sent to suppliers/developers, this is a function which simply finds random characters and inserts these.
I would recommend using the DataTumble script over this one as this leaves data very difficult to work with:
Before: StudentID StudentName DateOfBirth ----------- -------------------- ------------- 1 John Smith 1990-03-21 2 Fred Bloggs 1988-11-02 3 Another User 1985-07-11 4 Yet Another User 1977-06-25 After: StudentID StudentName DateOfBirth ----------- -------------------- ------------- 1 PDUHjRWJcb 1926-01-02 2 WRmNqQKxvuV 1969-03-14 3 nBCkAVDrvdhe 1968-05-05 4 RJDsFMaeNcLrcMWw 1964-08-08
- Before:
- StudentID StudentName DateOfBirth
- ----------- -------------------- -------------
- 1 John Smith 1990-03-21
- 2 Fred Bloggs 1988-11-02
- 3 Another User 1985-07-11
- 4 Yet Another User 1977-06-25
- After:
- StudentID StudentName DateOfBirth
- ----------- -------------------- -------------
- 1 PDUHjRWJcb 1926-01-02
- 2 WRmNqQKxvuV 1969-03-14
- 3 nBCkAVDrvdhe 1968-05-05
- 4 RJDsFMaeNcLrcMWw 1964-08-08
How?