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.
38 lines
3.3 KiB
38 lines
3.3 KiB
USE [Vertragsverwaltung_20160404]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[pr_dokument_selectall_bottomtable] Script Date: 02.12.2016 09:08:54 ******/
|
|
DROP PROCEDURE [dbo].[pr_dokument_selectall_bottomtable]
|
|
GO
|
|
/****** Object: StoredProcedure [dbo].[pr_dokument_selectall_bottomtable] Script Date: 02.12.2016 09:08:54 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
CREATE PROCEDURE [dbo].[pr_dokument_selectall_bottomtable]
|
|
---------------------------------------------------------------------------------
|
|
-- Stored procedure that will select all rows from the table 'Kuendigungsfrist'
|
|
-- Returns: @iErrorCode int
|
|
---------------------------------------------------------------------------------
|
|
@iErrorCode int OUTPUT,
|
|
@Fokus int,
|
|
@KeyValue int,
|
|
@mitarbeiternr int
|
|
AS
|
|
SELECT 0 as DokIcon, dbo.Dokument.DokumentNr, dbo.Dokument.keyvalue as VertragselementNr, dbo.Dokumenttyp.Bezeichnung as Dokumenttyp, dbo.Dokument.Bezeichnung AS Bezeichnung, dbo.Dokument.Beschreibung,
|
|
dbo.Dokument.Filename, dbo.Dokument.OriginalFilename_incl_Path, dbo.Dokument.Version, dbo.Dokument.VersionsNr, dbo.Dokument.Versionsdatum,
|
|
dbo.Dokument.Erstellt_am, dbo.Dokument.Mutiert_am, dbo.Dokument.Mutierer, dbo.Dokument.Aktiv, dbo.Dokument.SecurityLevelNr
|
|
FROM dbo.Dokument INNER JOIN
|
|
dbo.Dokumenttyp ON dbo.Dokument.DokumenttypNr = dbo.Dokumenttyp.Dokumenttypnr
|
|
where dbo.dokument.SecurityLevelnrin (select SecurityLevelNr from dbo.Get_SecurityLevelTab(@mitarbeiternr)) and keyvalue = @keyvalue and doktype=1
|
|
order by dbo.dokument.erstellt_am desc
|
|
|
|
SELECT @iErrorCode=@@ERROR
|
|
|
|
RETURN
|
|
|
|
|
|
|
|
|
|
GO
|