8
0

Maintain and add new SQL Procedures

This commit is contained in:
2025-03-05 09:06:56 +01:00
parent 6b3d9e010f
commit 97aa6cf5f8
7 changed files with 1565 additions and 65 deletions

View File

@@ -0,0 +1,36 @@
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- [FNDD_GET_WINDREAM_CHOICELIST_ITEMS]
-- =================================================================
-- Reads the windream database choice list and gives the
-- choice list items
--
-- Returns: Table (1 column)
-- =================================================================
-- Copyright (c) 2024 by Digital Data GmbH
--
-- Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
-- Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
-- =================================================================
-- Creation Date / Author: 13.12.2024 / MK
-- Version Date / Editor: 13.12.2024 / MK
-- Version Number: 1.0.0.0
-- =================================================================
-- History:
-- 13.12.2024 / MK - First Version
CREATE OR ALTER FUNCTION [dbo].[FNDD_GET_WINDREAM_CHOICELIST_ITEMS] (
@szListName NVARCHAR(255)
)
RETURNS TABLE
AS
RETURN
SELECT TOP (100) PERCENT [szValue] as 'Auswahlliste'
FROM [windreamDB].[dbo].[ChoiceListItem]
WHERE [dwChoiceListID] = (SELECT [dwChoiceListID] FROM [windreamDB].[dbo].[ChoiceList] WHERE [szListName] = @szListName)
AND LEN([szValue]) > 0
ORDER BY [Auswahlliste] ASC