I have 3 tables joined to produce one set of data in a MS Access query. This works fine, except my product table houses GroupControl & Product. When running the query, multiple rows are created if a GroupControl has more than one product.
I would like to find a way to concatenate the products for each GroupControl into one cell.
Here is the code I currently have written - what needs to be changed to house all products in one cell?
SELECT tblCustomer.Site, tblCustomer.PlanSponsorNam
e, tblCustomer.CompanyCode, tblCustomer.GroupControl, tblCustomer.EffectiveDate,
tblCustomer.PSUID, tblProducts.Product, tblCustomer.Bill, tblCustomer.DaysDeferred, tblCustomer.RenewalDate, tblCustomer.MarketSegment,
tblCustomer.Region, tblCustomer.Triad, tblCustomer.CFO, tblCustomer.CFOName, tblCustomer.EnrollType, tblCustomer.TermDate, tblCustomer.PSSCName, tblCustomer.PSSCAetnaID, tblCustomer.PSSCPhone, tblCustomer.ElecEligName, tblCustomer.ElecEligAetnaI
D, tblCustomer.ElecEligPhone,
tblCustomer.TPRAName, tblCustomer.TPRASup, tblCustomer.AcctMgr, tblCustomer.BrokerName, tblCustomer.BrokerFirm, tblCustomer.BrokerAddress,
tblCustomer.BrokerPhone, tblCustomer.BrokerEMail, tblCustomer.PSSTeamLeader,
tblCustomer.PSSTLPhone, tblPSSComments.Comment
FROM (tblCustomer LEFT JOIN tblPSSComments ON tblCustomer.GroupControl = tblPSSComments.GroupContro
l) LEFT JOIN tblProducts ON tblCustomer.GroupControl = tblProducts.Group_Control
WHERE (((tblCustomer.MarketSegme
nt)="SELEC
T" Or (tblCustomer.MarketSegment
)="KEY"))
ORDER BY tblCustomer.GroupControl;
Start Free Trial