in below is part of my store peocedure that used to reading data from a view of a table and processing on it , but that have a error and I want to know that... (in select statement appear 8 parameter and front of cursor appear 8 paramete but have Error!!!)
DECLARE CUR CURSOR FOR
SELECT PkJobDoneDaily_Id
, Fk_ExecCarInOwner
, Fk_ActivityType
, Fk_CostSrc
, Fk_ShiftNum
, Fk_WorkGroup
, DetachNum
TotalTime
FROM dbo. ViewAccJobDoneDaily
WHERE Fk_JobDonePeriod = @Fk_JobDonePeriod and IsOk=1 AND IsDel=0 AND Fk_ActivityType=2
OPEN CUR
FETCH NEXT FROM CUR INTO @Fk_JobDoneDaily,@Fk_ExecCarInOwner,@Fk_ActivityType
,@Fk_CostSrc,@Fk_ShiftNum,@Fk_WorkGroup,@DetachNum,@TotalTime
Error: Msg 16924, Level 16, State 1, Line 52 Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.