Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random distribution
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01275589
Message ID:
01275667
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform