You are here: Re: 10 Random records, 1 from each category « MsSQL Server « IT news, forums, messages
Re: 10 Random records, 1 from each category

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация