Question : SQL Server   view error: View Definition includes no output columns or includes not items in the from Clause

Hi All,
When i try to save my view this is what i get :
 "View Definition includes no output columns or includes not items in the from Clause"
The code is :
SELECT     SUM(CASE WHEN [event].[addDate] >= '10/1/2004' AND [event].[addDate] < '12/1/2004' AND [anh_Structural_RFI_sent] = - 1 AND
                      CallType.TypeName = 'consumer rep' THEN 1 ELSE 0 END) AS NumberOfRFISent
FROM         Call INNER JOIN
                      Event ON Call.Call_ID = Event.Call_ID INNER JOIN
                      CallType ON Call.CallType_ID = CallType.CallType_ID

Thanks :)

Answer : SQL Server   view error: View Definition includes no output columns or includes not items in the from Clause

What happens when your run just the select query, does it return any data?



This query should return the same thing:



SELECT COUNT(*) AS NumberOfRFISent
FROM
Call
INNER JOIN
Event
ON Call.Call_ID = Event.Call_ID
INNER JOIN
CallType ON Call.CallType_ID = CallType.CallType_ID
WHERE [event].[addDate] >= '10/1/2004'
AND [event].[addDate] < '12/1/2004'
AND [anh_Structural_RFI_sent] = - 1
AND CallType.TypeName = 'consumer rep'

Random Solutions  
 
programming4us programming4us