SQLTeam.com | Weblogs | Forums

Help with "Join" repeating rows


#1

Any help much appreciated. Trying to eliminate repeating rows. I've tried adding Select Distinct and/or Group by, no joy.

This query shows all of the required information, but repeats all tblcontact.

select tblContact.ContactName, tblContact.Email1, tblContact.Email2,
tblContact.Email3, tblContact.FirstName, tblContact.LastName, tblContact.BusiPhone,
tblContact.CellPhone, tblContact.Fax, tblContact.Website, tblContact.JobTitle,
tblCompany.CompName, tblCompany.CompPhone, tblCompany.CompFax, tblCompany.CompWebsite
from tblContact
inner join tblCompany
on tblContact.UserID=tblCompany.UserID


#2

Please post table scripts, sample data and expected output.
See http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/ for guidance.