DYNAMIC RESULT SETS 1
LANGUAGE SQL
ss: BEGIN

					     DECLARE crs CURSOR WITH RETURN FOR
					     SELECT ROUND(COUNT(DISTINCT os.OccurID) / 400.0, 1) AS AssemblerBFP
					     FROM OccurrencesStmt os
					          INNER JOIN Programs pgm ON os.ProgID = pgm.ProgramID
					     WHERE pgm.OccurID <> 0
					           AND pgm.programtypeid IN (8, 15, 16);
											 
						 OPEN crs;
				
END ss	




