CREATE PROCEDURE [dbo].[sp_getAllSchedeByIdModello] @idModello as int AS BEGIN SELECT R6_ReportSchede_Schede.idScheda, R6_ReportSchede_Schede.nomeImmagineScheda, R6_ReportSchede_Schede.testoHTML, R6_ReportSchede_Schede.numTab, R6_ReportSchede_Schede.sezioni, R6_ReportSchede_Schede.vincoli FROM R6_ReportSchede_Schede INNER JOIN R6_ReportSchede_ModelloScheda ON R6_ReportSchede_Schede.idScheda = R6_ReportSchede_ModelloScheda.idScheda WHERE R6_ReportSchede_ModelloScheda.idModello = @idModello order by R6_ReportSchede_Schede.idScheda END