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
 SQL Server Development (2000)
 Please don't hurt me...

Author  Topic 

Blastrix
Posting Yak Master

208 Posts

Posted - 2001-05-16 : 20:06:01
I'm performing a JOIN on two tables(news, newsLinks) there is a one to many relationship here. I only want the top 10 unique newsId numbers.

SELECT * FROM news LEFT JOIN newsLinks ON news.newsId = newsLinks.newsId

Would I need to go about creating an SP with a temp table and what not, or is there a way to do it with one query?

Edited by - blastrix on 05/16/2001 20:19:28
   

- Advertisement -