---如下是查询语句
--查询名称有退格键
select * from t_bd_item_info where charindex(char(8),item_name) > 0
go --查询名称有制表符tab
select * from t_bd_item_info where charindex(char(9),item_name) > 0
go
--查询名称有换行
select * from t_bd_item_info where charindex(char(10),item_name) > 0
go
--查询名称有回车
select * from t_bd_item_info where charindex(char(13),item_name) > 0
go
--查询名称的空格(前空格、后空格、所有空格)
select * from t_bd_item_info where isnull(charindex(' ',item_name),0) > 0
go
--查询名称的单引号
select * from t_bd_item_info where charindex(char(39),item_name) > 0
go
--查询名称的双单引号
select * from t_bd_item_info where charindex(char(34),item_name) > 0
go --处理名称有退格键
update t_bd_item_info set item_name = replace(item_name,char(8),'')
where charindex(char(9),item_name) > 0
go --处理名称有制表符tab
update t_bd_item_info set item_name = replace(item_name,char(9),'')
where charindex(char(9),item_name) > 0
go
--处理名称有换行
update t_bd_item_info set item_name = replace(item_name,char(10),'')
where charindex(char(10),item_name) > 0
go
--处理名称有回车
update t_bd_item_info set item_name = replace(item_name,char(13),'')
where charindex(char(13),item_name) > 0
go
--处理名称的空格(前空格、后空格、所有空格)
update t_bd_item_info set item_name = replace(rtrim(ltrim(item_name)),' ','')
where isnull(charindex(' ',item_name),0) > 0
go
--处理名称的单引号
update t_bd_item_info set item_name = replace(item_name,char(39),'')
where charindex(char(39),item_name) > 0
go
--处理名称的双单引号
update t_bd_item_info set item_name = replace(item_name,char(34),'')
where charindex(char(34),item_name) > 0
go

最新文章

  1. 基于Spring Mvc实现的Excel文件上传下载
  2. iOS 整理笔记 获取手机信息(UIDevice、NSBundle、NSLocale)
  3. Sass中文乱码问题(手动编译和watch编译)
  4. 今天说一下Order by 这个常规东西~
  5. 解析nginx负载均衡
  6. 利用http协议实现图片窃取
  7. [置顶] Codeforces Round #198 (Div. 1)(A,B,C,D)
  8. 自定义checkbox样式
  9. 原 iOS面试题收集
  10. Sql Server 循环添加日期--(累加到一个字段中)
  11. .NET对象占内存多少
  12. JavaScript 中常见设计模式整理
  13. java基础系列之ConcurrentHashMap源码分析(基于jdk1.8)
  14. WDS和DHCP配置说明
  15. Android-TextView 控件常用属性以及基本用法
  16. Select2日常操作集合
  17. sql server中的charindex函数用法解析(在一段字符中搜索字符或者字符串-----返回expression1在expression2出现的位置;反之,返回0)
  18. c# 数字之间的计算
  19. Android返回系统Home桌面
  20. 练习1 Just Java

热门文章

  1. swift - 代码创建 pickerView 显示或隐藏横线
  2. 9-最短路径(dijkstra)
  3. php多进程 防止出现僵尸进程
  4. php下ajax的文件切割上传
  5. async与await
  6. cookies,sessionStorage 和 localStorage 的区别
  7. 轮播图jQuery
  8. chrome 调试工具的使用
  9. 交互神器-最好用的Mac原型设计工具
  10. oracle存储过程结合我公司代码1