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 2005 Forums
 Transact-SQL (2005)
 Generating records in random order

Author  Topic 

imranabdulaziz
Yak Posting Veteran

83 Posts

Posted - 2009-06-10 : 09:04:11
Deal all,
I am using sql server 2005.
I have a table where contains paperid and question id and I show all the question related to paperid
Now I want every user must see different order of question set . that is
If table contains

Paperid questioned
A0001 1
A0001 2
A0001 3
A0001 4

Now User ‘A’ must see question paper in 2341 questionwise or B must see 1234
Every user must see paper in random order

Please suggest How to implement this

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-06-10 : 09:06:04
select Paperid, questioned from your_table
Order by newid()

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -