I have a stored procedure which, when called from the query analyzer, gives a set of records.
My understanding of a cursor is that it is declared sort of as follows:
DECLARE csrDesk CURSOR
LOCAL
FORWARD_ONLY
STATIC
READ_ONLY
FOR
SELECT d.Desks, d.Average_Desk_Cost
FROM Desk_Costs d
WHERE d.Office_No = @OffNo AND MONTH(d.Desk_Date) = MONTH(@EnDt) AND YEAR(d.Desk_Date) = YEAR(@EnDt)
My understanding of a cursor is that it is declared sort of as follows:
DECLARE csrDesk CURSOR
LOCAL
FORWARD_ONLY
STATIC
READ_ONLY
FOR
SELECT d.Desks, d.Average_Desk_Cost
FROM Desk_Costs d
WHERE d.Office_No = @OffNo AND MONTH(d.Desk_Date) = MONTH(@EnDt) AND YEAR(d.Desk_Date) = YEAR(@EnDt)