![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MS SQL SERVER 字符处理
xluzhong
这个作者很懒,什么都没留下…
展开
-
搜索某个字符串在那个表的那个字段中
--搜索某个字符串在那个表的那个字段中declare @str varchar(100)set @str=White --要搜索的字符串declare @s varchar(8000)declare tb cursor local forselect s=if exists(select 1 from [+b.name+] where [+a.name+] like %+@s转载 2005-04-09 14:24:00 · 721 阅读 · 0 评论 -
从目标字符串中查找是否有指定一个或多个子字符串
/***************************************fn_FindString**从目标字符串中查找是否有指定一个或多个子字符串**xspf.cn@gmail.com***************************************/--@StrDest:目标字符串,分隔--@StrPattern:需匹配字符串(,分隔)--返回:找到的所有匹配项IF转载 2005-04-13 10:57:00 · 1077 阅读 · 0 评论 -
短信字符串分拆
原帖地址:http://community.csdn.net/Expert/topic/3927/3927305.xml?temp=.5815851/*--问题描述根据自定义信息前缀表(每个信息前缀可以看作是一个信息分隔符)进行字符串分拆处理的函数,在分拆处理函数中,首先定义了一个信息前缘表@splits,表中包含了AC、BC、CC、DC四个信息前缀(实际使用时,可以在函数中添加其他信息前缘,也可转载 2005-04-18 13:18:00 · 717 阅读 · 0 评论 -
字段里字符串处理问题
原帖地址:http://community.csdn.net/Expert/topic/3244/3244874.xml?temp=.5755274表一:MenuTree? Id??????????????????? context????????????????? -----------? ---------------------------1????????????????????? 商场监转载 2005-04-18 13:26:00 · 648 阅读 · 0 评论 -
非法字符替换函数
if exists (select * from dbo.sysobjects where id = object_id(N[dbo].[f_replace]) and xtype in (NFN, NIF, NTF))drop function [dbo].[f_replace]GO/*--非法字符替换函数去掉字符串中,小于32的字符保留 TAB char(9)转载 2005-04-19 14:30:00 · 855 阅读 · 0 评论 -
更新字符串列表中,指定位置的字符串
if exists (select * from dbo.sysobjects where id = object_id(N[dbo].[f_updatestr]) and xtype in (NFN, NIF, NTF))drop function [dbo].[f_updatestr]GO/*--更新字符串列表中,指定位置的字符串 更新字符串列表中,指定位置的字符串为新的值 如转载 2005-04-19 14:33:00 · 727 阅读 · 0 评论 -
通过函数得到16进制的字符串
--自己写用户定义函数create function f_Char2Binary(@str varchar(8000))returns varchar(8000)ASBEGINDECLARE @r varbinary(8000),@i int,@j intselect @r=cast(@str as varbinary(8000)),@i=datalength(@r),@str=while @转载 2005-05-26 17:21:00 · 774 阅读 · 0 评论