AS SELECT 	Bms.BmsID, 
			Bms.BmsName, 
			Paths.PathStr, 
			Occurrences.StartRow
FROM  (Occurrences INNER JOIN
      Paths ON Occurrences.PathID = Paths.PathID) INNER JOIN
      Bms ON Occurrences.OccurID = Bms.OccurID
WHERE     (Bms.BmsID IN (Select * from #numeric_param_temp))
ORDER BY Bms.BmsName
