10ecdfa2e4
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>
41 lines
1.0 KiB
Transact-SQL
41 lines
1.0 KiB
Transact-SQL
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date,,>
|
|
-- Description: <Description,,>
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[fds__admin_updateconflicttables]
|
|
@entitytype nvarchar(255)
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON;
|
|
|
|
DECLARE @name nvarchar(255);
|
|
IF RIGHT(@entitytype,1) <> 's'
|
|
SET @entitytype = @entitytype + 's';
|
|
|
|
DECLARE db_cursor CURSOR FOR
|
|
select [name] from sys.objects
|
|
where LEFT(name,2) = 't_'
|
|
order by create_date asc;
|
|
|
|
OPEN db_cursor
|
|
FETCH NEXT FROM db_cursor INTO @name ;
|
|
|
|
WHILE @@FETCH_STATUS = 0
|
|
BEGIN
|
|
PRINT( @name);
|
|
|
|
|
|
IF LEFT(@name, 2) = 't_' and @name like ('%' + @entitytype + '%')
|
|
BEGIN
|
|
DECLARE @sql nvarchar(2000) = 'EXECUTE [dbo].[mfr__updt__' + @entitytype + '] @name, null, null;DROP TABLE [dbo].[' + @name + N'];';
|
|
EXECUTE sp_executesql @sql, N'@name nvarchar(255)', @name;
|
|
PRINT( @name + ' --> done');
|
|
END
|
|
|
|
FETCH NEXT FROM db_cursor INTO @name
|
|
END
|
|
|
|
CLOSE db_cursor
|
|
DEALLOCATE db_cursor
|
|
END |