Hi,I need some expert help.I am doing a select distinct on multiple columns.But there are some columns, i would like to exclude from this distinct selection, cause the should be different.Can that be done at all? In the following select i would like to exclude; PartnerId, PartnerName and DISTANCE from the distinct. SELECT Distinct P.TyreTreadPattern ,CONVERT(INT,REPLACE(P.ListPrice,',000','')) as ListPrice ,dbo.fnPercent(U.PercentFactor,P.ListPrice) AS NORMALPRICE ,CASE WHEN NOT C.PercentFactor IS NULL THEN dbo.fnPercent(C.PercentFactor,dbo.fnPercent(U.PercentFactor,P.ListPrice)) ELSE 0 END AS REDUCEDPRICE ,CASE WHEN NOT C.PercentFactor IS NULL THEN convert(int,dbo.fnPercent(U.PercentFactor,P.ListPrice)) - convert(int, dbo.fnPercent(C.PercentFactor,dbo.fnPercent(U.PercentFactor,P.ListPrice))) ELSE 0 END AS SAVEAMOUNT ,CASE WHEN NOT C.PercentFactor IS NULL THEN U.PercentFactor+C.PercentFactor ELSE U.PercentFactor END AS FULLPERCENT ,ISNULL(C.PercentFactor,0) AS FULLPERCENTFACTOR ,U.PercentFactor AS NORMALPROCENT ,U.UndergruppeId ,U.UndergruppeNavn ,P.TyreSectionWidth ,P.TyreAspectRatio ,P.TyreRimDiameter ,P.TyreSpeedRating ,P.TyreLoadIndex ,P.TyreWet ,P.TyreType ,P.TyreNoise ,P.TyreNoiseClass ,P.TyreFuel ,C.PartnerId ,dbo.GetUMBMemberPropertyValue(C.PartnerId, 'memWorkshopName') AS PartnerName , dbo.Distance(dbo.GetUMBMemberPropertyValue(C.PartnerId, 'latitude'),dbo.GetUMBMemberPropertyValue(C.PartnerId, 'longitude'),@lat,@lng) AS DISTANCE FROM [cartendo_dk_db].[dbo].[CompilatorPricemanager] AS P INNER JOIN CompilatorPricemanagerUnderGrupper AS U ON U.UndergruppeId = P.SubGroup LEFT JOIN dbo.Partner_Campaigns as C ON ( (U.UndergruppeId = C.TyreId ) OR (C.CarId = (SELECT id FROM Partner_CarModels WHERE Make like '%' + @CarName + '%') ) OR (C.RegionsNr = isnull((SELECT DISTINCT(Regionsnr) FROM Partner_Regioner_Kommuner_Postnr WHERE Postnr=@Zipcode), C.RegionsNr) ) OR ( C.CarAgeGroup = isnull(( CASE WHEN @CarAge < 6 THEN 1 ELSE 0 END ), C.CarAgeGroup) ) ) WHERE P.MainGroup= @TyreType AND p.ListPrice <> '0,000' AND P.[TyreSectionWidth] = @SectionWidth AND P.[TyreAspectRatio]=@AspectRatio AND P.[TyreRimDiameter]=@Diameter ORDER BY REDUCEDPRICE ASC, DISTANCE ASC