Compare commits

..

2 Commits

Author SHA1 Message Date
jiangs
568cd5d594 Merge remote-tracking branch 'lis8.0/master' 2025-08-13 15:46:38 +08:00
jiangs
bdb30950b3 初始化sql脚本修改 2025-08-13 15:46:16 +08:00
5 changed files with 1614 additions and 1576 deletions

View File

@ -0,0 +1,40 @@
/****** Object: UserDefinedFunction [dbo].[Find_In_Set] Script Date: 08/13/2025 12:30:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- 创建自定义函数
create FUNCTION [dbo].[Find_In_Set] (@str NVARCHAR(255), @strlist NVARCHAR(MAX))
RETURNS INT
AS
BEGIN
DECLARE @pos INT = 1;
DECLARE @currentStr NVARCHAR(255);
DECLARE @startPos INT = 1;
DECLARE @endPos INT;
WHILE @startPos <= LEN(@strlist)
BEGIN
SET @endPos = CHARINDEX(',', @strlist, @startPos);
IF @endPos = 0
SET @endPos = LEN(@strlist) + 1;
SET @currentStr = SUBSTRING(@strlist, @startPos, @endPos - @startPos);
IF @currentStr = @str
RETURN @pos;
SET @startPos = @endPos + 1;
SET @pos = @pos + 1;
END;
RETURN 0;
END;
GO

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
-- ----------------------------
-- 修改项目脚本执行(如果存在存储过程和函数等特殊类型,则新增一个sql文件为妥)
-- ----------------------------
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_dict' AND COLUMN_NAME = 'userflag')
begin
alter table com_dict add userflag varchar(1)
end

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_dict' AND COLUMN_NAME = 'userflag')
begin
alter table com_dict add userflag varchar(1)
end