You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ITSM/.svn/pristine/fe/fe2f997b54254ad50e83645cea3...

41 lines
4.4 KiB

USE [Vertragsverwaltung_20160404]
GO
/****** Object: StoredProcedure [dbo].[sp_get_Lizenz_VEApplElemente] Script Date: 02.12.2016 09:08:53 ******/
DROP PROCEDURE [dbo].[sp_get_Lizenz_VEApplElemente]
GO
/****** Object: StoredProcedure [dbo].[sp_get_Lizenz_VEApplElemente] Script Date: 02.12.2016 09:08:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
create PROCEDURE [dbo].[sp_get_Lizenz_VEApplElemente]
@mitarbeiternr int,
@vertragspartnernr int
as
BEGIN
SELECT TOP (100) PERCENT dbo.VertragselementApplikation.VertragselementApplikationnr, dbo.VertragselementApplikation.Vertragselementnr,
dbo.VertragselementApplikation.Applikationnr, dbo.Vertragselement.Bezeichnung AS Vertragselement, dbo.Applikation.Bezeichnung AS Applikation,
dbo.VertragselementApplikation.Bemerkung, dbo.VertragselementApplikation.Aktiv, dbo.VertragselementApplikation.Erstellt_am,
dbo.VertragselementApplikation.Mutiert_am, dbo.VertragselementApplikation.Mutierer, dbo.ApplikationVersion.Version
FROM dbo.VertragselementApplikation INNER JOIN
dbo.Vertragselement ON dbo.VertragselementApplikation.Vertragselementnr = dbo.Vertragselement.Vertragselementnr INNER JOIN
dbo.Applikation ON dbo.VertragselementApplikation.Applikationnr = dbo.Applikation.ApplikationNr INNER JOIN
dbo.Vertragstyp ON dbo.Vertragselement.VertragstypNr = dbo.Vertragstyp.Vertragstypnr LEFT OUTER JOIN
dbo.ApplikationVersion ON dbo.VertragselementApplikation.ApplikationVersionNr = dbo.ApplikationVersion.ApplikationVersionNr
where dbo.vertragselement.VertragspartnerNr=@vertragspartnernr and
dbo.vertragselement.SecurityLevelnrin (select SecurityLevelNr from dbo.Get_SecurityLevelTab(@mitarbeiternr)) and
dbo.vertragselementapplikation.aktiv=1 and dbo.Vertragstyp.AlsLizenz=1
order by dbo.applikation.bezeichnung
END
GO