Add Fuchs_Database SSDT project (schema source of truth)
Adds the SQL Server Data Tools project for the fuchs_fds database — tables, table types, functions and stored procedures that the backend calls (e.g. fds__getInvoice, fds__merge_bankingtransactions, fds__tt__bankingtransactions, fds__admin_getReportCatalog, fis_* auth). Build/model caches (bin, obj, *.dbmdl, *.jfm, *.user) are git-ignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
|
||||
|
||||
-- =============================================
|
||||
-- Author: <Author,,Name>
|
||||
-- Create date: <Create Date, ,>
|
||||
-- Description: <Description, ,>
|
||||
-- =============================================
|
||||
CREATE FUNCTION [dbo].[ott_jcontent]
|
||||
(
|
||||
@groupcode varchar(10)
|
||||
,@text varchar(4000)
|
||||
)
|
||||
RETURNS varchar(4000)
|
||||
AS
|
||||
BEGIN
|
||||
DECLARE @RET varchar(4000);
|
||||
DECLARE @textinput varchar(4000) = REPLACE(ISNULL(@text, ''), ' ', '');
|
||||
|
||||
IF (@textinput = '' OR @textinput = '{}')
|
||||
BEGIN
|
||||
SET @RET = 0;
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
DECLARE @Pattern varchar(20) = '%"' + @groupcode + '":"%';
|
||||
DECLARE @P0 int = PATINDEX(@pattern, @textinput);
|
||||
DECLARE @P1 int = @P0 + LEN(@pattern) -2;
|
||||
DECLARE @P2 int = CHARINDEX('"',@textinput,@p1);
|
||||
|
||||
SELECT @RET = CASE WHEN @P0 = 0 THEN '' ELSE SUBSTRING(@textinput, @P1, @P2 - @P1) END;
|
||||
END
|
||||
|
||||
RETURN @RET;
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user