|
導讀數據庫,簡而言之可視為電子化的文件柜——存儲電子文件的處所,用戶可以對文件中的數據進行新增、截取、更新、刪除等操作。所謂“數據庫”是以一定方式儲存在一起、能與多個用戶共享、具有盡可能小的冗余度、與應... 數據庫,簡而言之可視為電子化的文件柜——存儲電子文件的處所,用戶可以對文件中的數據進行新增、截取、更新、刪除等操作。所謂“數據庫”是以一定方式儲存在一起、能與多個用戶共享、具有盡可能小的冗余度、與應用程序彼此獨立的數據集合。 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 全新的路由器不僅讓你更穩定快速地連接無線網絡,更可以讓家中的智能設備連接在一起。 |
溫馨提示:喜歡本站的話,請收藏一下本站!