原文:SQL Server判断某个字段是否包含中文/英文字符/数字 因最近在清理系统中的脏数据,需要查询某个字段是否包含中文/英文字符/数字的数据, 比较简单,仅以此篇博客做一个简单总结,方便以后查阅. 1.判断某个字段是否包含中文字符 SELECT * FROM dbo.Channel_ShopCommodity AND StoreCode LIKE '%[吖-座]%'; 2.判断某个字段是否包含英文字符 SELECT * FROM dbo.Channel_ShopCommodity AND
update (select length(t.name), t.* -- name,length(name) from g_enterprise_info t where nvl2(translate(name, '\1234567890 ', '\'), 'is characters ', 'is number ') = 'is number ' and asciistr(gszcdjh) like '%\%') set name = gszcdjh, gszcdjh =name ; 判断一
以下为本次实践代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace ConsoleTest { class Program { static void Main(string[] arg
sql server 查找包含字符串的对象 SELECT sm.object_id, OBJECT_NAME(sm.object_id) AS object_name, o.type, o.type_desc, sm.definition FROM sys.sql_modules AS sm JOIN sys.objects AS o ON sm.object_id = o.object_id where sm.definition like '%要匹配的内容%' --collate SQL_L