Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top 1 of a join 1

Status
Not open for further replies.
Jan 23, 2002
63
US
I have a database that has a central table called applications, joined in a many to many relationship with three other tables, contacts, vendors, and servers. I.E., an application can be installed on multiple servers, or multiple applications can be installed on one server. The same goes for the other tables.

I have a view that joins the tables with LEFT OUTER JOIN. As expected, when there are multiple contacts, say, for one application, I get multiple rows for that application, each showing a different contact.

I need to do a different view, showing only one row for each application, and say the first contact, server and vendor it finds. How would I do this, with a TOP 1 statement? A left INNER join? Please help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top