AS SELECT TOP 100 PERCENT 
		IdmsSubschemaRecords.ID, 
		IdmsSubschemaRecords.RecordName, 
        Paths.PathStr AS [Definition Source], 
        Occurrences.StartRow,
        IdmsSchema.SchemaName
FROM    (	(	(Occurrences INNER JOIN
       		 	Paths ON Occurrences.PathID = Paths.PathID
       		 	) INNER JOIN
        		IdmsSubschemaRecords ON Occurrences.OccurID = IdmsSubschemaRecords.OccurId
        	) INNER JOIN
        	IdmsSubschema ON IdmsSubschemaRecords.SubschemaId = IdmsSubschema.ID
        ) INNER JOIN IdmsSchema ON IdmsSubschema.SchemaId = IdmsSchema.ID
WHERE     (IdmsSubschemaRecords.ID IN (Select * from #numeric_param_temp))
ORDER BY IdmsSchema.SchemaName, IdmsSubschemaRecords.RecordName