Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-12-12 : 08:17:19
|
| I want to shuffle the values in a column among all the rows.Seems to me something using NEWID() and ORDER BY ought to be possible, but I'm left hangingCREATE TABLE MyTable (UserID INT ,Firstname varchar(20) ,Lastname varchar(20))What's the easiest method to randomize Firstname among all the rows in MyTable?Sam |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-12-12 : 08:21:08
|
| you want to mix and match first and last names ?Damian |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-12-12 : 08:36:43
|
| Yep. I should have said earlier, I'd like it to be an UPDATEUPDATE ASET A.Firstname = .. random firstname |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-12-12 : 08:57:29
|
| Yes, that thread was one of the SQLTeam landmark solutions in my book. I actually discussed that solution with my lunch buddies who were not programmers. This just goes to show I was so impressed I was willing to bore others and risk losing friendship so I could recant the solution.But this is a little different. And it feels like there should be a solution that doesn't require temp tables. |
 |
|
|
|
|
|