Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random distribution
Message
De
13/12/2007 15:11:25
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01275589
Message ID:
01275661
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
>>>>
>>>>SELECT TOP xxx  *, NEWID() as Test
>>>>       FROM YoutTable
>>>>ORDER BY NEWID()
>>>>
>>>>
>>>>where xxx is any number from 1 to ...
>>>>
>>>>I thought you want to SET values not to SELECT records
>>>
>>>Funny thing that I posted this solution long time ago here (don't recall where did I pick it, from tek-tips, I believe).
>>>
>>>Anyway, I want to insert about a million records and I want to somehow don't have the same values. What would be the best approach?
>>>
>>>BTW, I found that I only inserted about 10K records. Missed one zero in my counter, I guess.
>>
>>Yeah,
>>From tek-tips it is :-)
>>What you have as insert routine?
>
>I think to make things easier and not to run select inside the loop I would just hardcode 5 cases depending on mod(counter) - need to find the equavalent T-SQL function.
 int1 % int2
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform