|
导读数据库,简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进行新增、截取、更新、删除等操作。所谓“数据库”是以一定方式储存在一起、能与多个用户共享、具有尽可能小的冗余度、与应... 数据库,简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进行新增、截取、更新、删除等操作。所谓“数据库”是以一定方式储存在一起、能与多个用户共享、具有尽可能小的冗余度、与应用程序彼此独立的数据集合。 if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[f_updatestr]’) and xtype in (N’FN’, N’IF’, N’TF’)) drop function [dbo].[f_updatestr] GO /*--更新字符串列表中,指定位置的字符串 更新字符串列表中,指定位置的字符串为新的值 如果位置超出范围,则不做更新--*/ /*--调用示例 select dbo.f_updatestr(’001|002|003|’,1,’00a’,’|’) --*/ create function f_updatestr( @s varchar(8000), @pos int, @newstr varchar(100), @spliststr varchar(10) --字符串列表的分隔符 )returns varchar(8000) as begin declare @i int,@ilen int select @i=charindex(@spliststr,@spliststr+@s) ,@ilen=len(@spliststr) while @i>0 and @pos>1 select @i=charindex(@spliststr,@s,@i)+@ilen ,@pos=@pos-1 return(case @i when 0 then @s else stuff(@s,@i,charindex(@spliststr,@s+@spliststr,@i)-@i,@newstr) end) end go 全新的路由器不仅让你更稳定快速地连接无线网络,更可以让家中的智能设备连接在一起。 |
温馨提示:喜欢本站的话,请收藏一下本站!