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/9f/9f9895c16ad49a9334b2cdaa8d8...

34 lines
2.1 KiB

USE [Vertragsverwaltung_20160404]
GO
/****** Object: StoredProcedure [dbo].[sp_get_struktur_oe] Script Date: 02.12.2016 09:08:53 ******/
DROP PROCEDURE [dbo].[sp_get_struktur_oe]
GO
/****** Object: StoredProcedure [dbo].[sp_get_struktur_oe] 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_struktur_oe] @per DATETIME
AS
BEGIN
SELECT oenr AS id, parentid, bezeichnung, 0 AS imageindex, beschreibung AS ErweiterteSuche, sortierung AS Sort
into #tmp2
FROM dbo.OE where aktiv=1
INSERT #tmp2 ( id, parentid, bezeichnung, imageindex, ErweiterteSuche, sort )
VALUES ( '0', NULL, 'Root', 0, ' ',1 )
SELECT * FROM #tmp2 ORDER BY parentid,sort, Bezeichnung
DROP TABLE #tmp2
return
END
GO