We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
SELECT M.[ID], CASE WHEN [title] = 1 THEN 'Mr' WHEN [title] = 2 THEN 'Mrs' WHEN [title] = 3 THEN 'Miss' WHEN [title] = 4 THEN 'Ms' ELSE '' END AS Title, [FirstName], [LastName], [Birthdate], [ClubName] as TradingAs, [AccountType], CASE WHEN [UK-Member] = 'Y' THEN 'UK' WHEN [Eire-Member] = 'Y' THEN 'Eire' WHEN [EU-Member] = 'Y' THEN 'EU' END AS PartnerCategory, [RDA-ID], [PGA-Number], EX.[Exchequer-Code], [Startdate], [ExitDate], [Profits], [VAT-Liable], P.Phone, 'Mobile', 'TGIEmail', 'AltEmail', [URL], PS.facebook, PS.twitter, [RetainerSurvey] FROM [dbo].[Member] M Left join dbo.[Member-Exchequer-Codes] EX on EX.MemberID = M.ID left join dbo.PartnerSocialMedia PS on PS.PartnerID = M.ID left join (select top (1) P.MemberID, P.Phone from dbo.[Member-Phone] P Where Type = 1 AND DefaultP = 'Y' Group by P.MemberID) P on P.MemberID = M.ID
left join (select top (1) P.MemberID, P.Phone from dbo.[Member-Phone] P Where Type = 1 AND DefaultP = 'Y' Group by P.MemberID) P on P.MemberID = M.ID
Msg 8120, Level 16, State 1, Line 35
Column 'dbo.Member-Phone.Phone' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.