Compare commits
2 Commits
ebd2d54367
...
568cd5d594
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
568cd5d594 | ||
|
|
bdb30950b3 |
40
sql/lis8.0/Find_In_Set.sql
Normal file
40
sql/lis8.0/Find_In_Set.sql
Normal 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
|
||||
|
||||
|
||||
1565
sql/lis8.0/ruoyi_lis8.0_sqlserver.sql
Normal file
1565
sql/lis8.0/ruoyi_lis8.0_sqlserver.sql
Normal file
File diff suppressed because it is too large
Load Diff
9
sql/lis8.0/updatedb_lis8.0.sql
Normal file
9
sql/lis8.0/updatedb_lis8.0.sql
Normal 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
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user