|
Posted by Madhivanan on 12/08/06 13:44
FrankEBailey@gmail.com wrote:
> I'm not sure if this is a completely dumb question, but please humor me
> :) I have a table of records, called Records, each of which has a
> Category_ID that places it in a specific category; the details of the
> categories are stored in another table called Category. What I need to
> do is retrieve a recordset that contains one record from each category,
> but where the records that are retrieved are random. I know how to
> retrieve one or more random records using "order by NewID()", but have
> not been able to work out how to get one random record from each
> category.
>
> Any assistance in this puzzler will be HUGELY appreciated!
>
> Thanks
> FEB
Also Refer point 2
http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspx
Madhivanan
Navigation:
[Reply to this message]
|