I am trying toe create an indexed view but cannot seem to get it right.
CREATE VIEW dbo.D_Policy_View with schemabinding
SELECT Policy_ID, Environment_Code, CoB, Sub_CoB, Policy_No, Version_No
WHERE (Policy_ID IN
GROUP BY Environment_Code, COB, Policy_No, SUB_COB))
I have read on BoL that MAX is not allowed but don't know of any other way to get the latest record??