USE [Vertragsverwaltung_20160404] GO /****** Object: StoredProcedure [dbo].[sp_Check_Lizenzen] Script Date: 02.12.2016 09:08:54 ******/ DROP PROCEDURE [dbo].[sp_Check_Lizenzen] GO /****** Object: StoredProcedure [dbo].[sp_Check_Lizenzen] Script Date: 02.12.2016 09:08:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO --------------------------------------------------------------------------------- -- Stored procedure that will select all rows from the table 'Lizenzkauf' -- Returns: @iErrorCode int --------------------------------------------------------------------------------- CREATE PROCEDURE [dbo].[sp_Check_Lizenzen] @Vertragselementapplikationnr int, @anzahl int output AS SET NOCOUNT ON select @anzahl=COUNT(*) FROM dbo.LizenzVertragselementApplikation where VertragselementApplikationNr=@vertragselementapplikationnr and Aktiv=1 GO