Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random distribution
Message
 
 
À
13/12/2007 15:07:16
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:
01275667
Vues:
15
>I am not sure what Random Symbol means, something like this?
>
>while @counter >5
>  begin
>   insert into Table1 values ('First' + @AddStr, ...)
>   insert into tabl2 values (SCOPE_IDENTITY(), ????, CAST(RAND()*10000000 as int)/RAND())
>   set @counter = @counter - 1
>end
Random Symbol means that I have a third table with currently only a few records and I just want to get random info from this table to insert into the table2 :)

But I would suspect that having select inside the loop would be slow.

Anyway, since it's for fun and tests, I may just go for it using your first idea.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform