Clustered index on view

Tags:
Clustered Index
I've created the view:
USE [TorqueNet]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER VIEW [dbo].[MY_JOINTS_NUMBER]

WITH SCHEMABINDING

AS

SELECT SPINDLE_GROUP_RESULTS.CONTROLLER,SPINDLE_RESULTS.JOINT_NUMBER,SPINDLE_GROUP_RESULTS.SPINDLE_GROUP,

MAX (SPINDLE_GROUP_RESULTS.PROCESS_TIME) ASLAST_RUNDOWN, COUNT (*) AS COUNT

FROM [dbo].[SPINDLE_GROUP_RESULTS], [dbo].[SPINDLE_RESULTS]

WHERE PROCESS_TIME > (GETDATE () - 31)

AND SPINDLE_RESULTS.JOINT_NUMBER IS NOT NULL

AND SPINDLE_GROUP_RESULTS.CONTROLLER   =SPINDLE_RESULTS.CONTROLLER

AND SPINDLE_GROUP_RESULTS.RUNDOWN   =SPINDLE_RESULTS.RUNDOWN

AND JOINT_NUMBER <> '0'

GROUP BY SPINDLE_GROUP_RESULTS.CONTROLLER,SPINDLE_RESULTS.JOINT_NUMBER,SPINDLE_GROUP_RESULTS.SPINDLE_GROUP;

GO
I want to put Unique Clustered index on this view. Please help as in this view we used MAX, it is not allowing.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: