No, I don't want to group. I just want distinct on a subset of columns.
Given this View
CREATE VIEW dbo.vw_OrderKeys
AS
SELECT
o.OrderID
,o.CustomerID
,o.EmployeeID
,o.OrderDate
,d.ProductID
FROM
[dbo].[Orders] o
JOIN dbo.[Order Details] d
ON o.OrderID = d.OrderID
I want to do this equivalent:
SELECT Distinct
k.CustomerID
,k.ProductID
FROM dbo.vw_OrderKeys k
Typically I'd be adding some predicate expression onto that to limit the results.
Joel Reinford
Data Management Solutions LLC