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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to get Random numbers

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-01 : 15:09:45
Archana writes "Hi,

I have two columns Eno & Elocation with 200 records.
I need to get 2 random Eno in each Elocation. when I run query again I need 2 different Eno in Elocation.
Ex: I have IL, NY, TX Elocations. Each time I need 2 records in each Elocation.
Eno Elocation
1 IL
3 IL
4 NY
2 NY
8 TX
5 TX
How to write this query in Microsoft SQL Server2000?"

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2005-08-01 : 15:09:45
If you search the site on "random" you'll find all kinds of articles about this.
Go to Top of Page
   

- Advertisement -