June 19, 2002 at 5:30 am
Does anyone now how can i sort one record in one table of my database? Is there a function for it? Something similar to RANDOMIZE of Pascal..
Thanks! 😀
David Falcão
www.darte.com.br
June 19, 2002 at 5:51 am
There is RAND but not a very good random number. You question is a little confusing to know what you want.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
June 19, 2002 at 7:27 am
I'll try to explain better now..
Let's say that i have a table with questions from a test..And i want my stored procedure to sort one random question from my table.
The question is? How can i sort this question?
Will i have to create a stored proc to do that or there is a function that already do that for me?
Thanks..
David Falcão
www.darte.com.br
June 19, 2002 at 8:23 am
you can play with NEWID and order it ,to get the records in random order. i had seen this article on another site. if the moderators are comfortable with the idea, i can post the link.
June 19, 2002 at 5:31 pm
Links are ok to post here and I am curious about this propsed method.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
June 19, 2002 at 11:23 pm
Thanx Antares, i was carefull coz the site am refferign to also has forums and am a regular there.
Anywayz, herez the link http://www.sqlteam.com/item.asp?ItemID=8747 .
Alternatively if you are using SQL 7.0 . you can try this too
http://www.sqlteam.com/item.asp?ItemID=217
HTH
June 20, 2002 at 5:54 am
Cool, had never thought of that. Works great.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply