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 |
|
mavershang
Posting Yak Master
111 Posts |
Posted - 2010-04-27 : 17:48:50
|
| Hi there. I have a problem with randomizing a column. Here is my question.The original table contains Marker Col1 Col21 A C2 A A3 B D...I want to randomize Col1 and get a temporary table likeCol1 Col2A AB C.....This table will be used to calculate some statistic value. Because this randomization step need to be repeated over 10^6 times, temporary table created in the intermediate step might not be efficient enough. Could anyone help me out? Thanks |
|
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2010-04-27 : 18:24:53
|
| Looks like your Col2 is sorted. SELECT * FROM TAB order by COL2, NEWID() |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-28 : 05:57:52
|
| how did B got associated to C? you dont have such a record in your sample?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|