非法字符替换函数
来源:互联网 发布:关于p2p网络借贷监管 编辑:程序博客网 时间:2024/04/28 03:30
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_replace]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[f_replace]
GO
/*--非法字符替换函数
去掉字符串中,小于32的字符
保留 TAB char(9)
换行 char(10)
回车 char(13)
如果上述字符也不需要,则将函数中的注释删除
--邹建 2004.09(引用请保留此信息)--*/
/*--调用示例
--调用函数进行替换处理的示例
declare @s varchar(10)
set @s='a '+'b'+char(11)+'c'
select dbo.f_replace(@s)
--*/
create function f_replace(
@str varchar(8000)
)returns varchar(8000)
as
begin
select @str=replace(@str,a,'')
from(select a=N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N''
--union all select N''--TAB char(9)
--union all select N'
--'--换行 char(10)
union all select N''union all select N''
--union all select N'
--'--回车 char(13)
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'' union all select N''
union all select N'
- 非法字符替换函数
- 替换sql查询非法字符
- 非法字符处理(替换)
- 过滤非法字符函数
- 非法字符替换,防SQL注入(asp)
- 正则替换非法字符的一个思路
- php 替换非法字符 保存到数据库
- asp 过滤非法字符函数
- 替换xml中的非法字符及不可见字符
- JS字符替换函数
- Replace替换字符函数
- 用scanf函数检验输入非法字符
- 自定义delphi替换字符函数
- sql 字符替换函数 replace
- 字符串非法替换
- ASP过虑非法字符,SQL防注入函数,禁止非法提交
- 过滤非法字符 一
- 过滤非法字符 二
- COM编程入门(第一部分 什么是COM,如何使用COM)
- 更新字符串列表中,指定位置的字符串
- html上传文件的实例
- 搜索某个字符串在那个表的那个字段中
- 从live.com邮箱抢注看JS一用
- 非法字符替换函数
- 又撞警察了……
- 电影《满城尽带黄金甲》周杰伦接受了新浪娱乐独家对话
- outlook&vmware settings
- 野葡萄文学志:封面人物之周杰伦
- 杰伦是个有责任感的人
- 短信字符串分拆
- SQL Server2000 未公开的存储过程
- Week Overview(11.14)