DataTumble - Randomize Data Rows
- Joel Lipman
- Transact-SQL
- Hits: 5457
This is a stored procedure I've nabbed from some consultants from my day job. It shuffles the records and matching data values:
Before:
ID Name DateOfBirth --------- ------------ ----------- 1 John Smith 1988-06-24 2 Fred Bloggs 1972-11-17 3 Another User 1964-02-18
- ID Name DateOfBirth
- --------- ------------ -----------
- 1 John Smith 1988-06-24
- 2 Fred Bloggs 1972-11-17
- 3 Another User 1964-02-18
ID Name DateOfBirth --------- ------------ ----------- 1 Fred Bloggs 1964-02-18 2 Another User 1988-06-24 3 John Smith 1972-11-17
- ID Name DateOfBirth
- --------- ------------ -----------
- 1 Fred Bloggs 1964-02-18
- 2 Another User 1988-06-24
- 3 John Smith 1972-11-17
How?