DYNAMIC RESULT SETS 1
LANGUAGE SQL
ss: BEGIN

	            BEGIN
					    DECLARE crs CURSOR WITH RETURN FOR
						SELECT  sd.ID,
					            sd.ScreenName,
					            pth.PathStr AS Definition_Source,
					            occ.StartRow
					     FROM Occurrences occ
					          INNER JOIN Paths pth ON occ.PathID = pth.PathID
					          INNER JOIN ScreenDDS sd ON occ.OccurID = sd.OccurId
					    WHERE sd.ID IN (SELECT * FROM SESSION.numeric_param_temp)
					    ORDER BY sd.ScreenName;
					     
				        OPEN crs;
				
                END;
END ss	



