无法在system.decimal和system.string上执行“喜欢"操作 [英] cannot perform 'like' operation on system.decimal and system.string
问题描述
我收到此消息:无法在system.decimal和system.string上执行喜欢"操作.
i am getting this msg : cannot perform 'like' operation on system.decimal and system.string.
当我使用like运算符搜索数据表的数字字段时.
when i use like operator to search on numeric field of my data table.
Developer
Developer
推荐答案
您的实际代码是什么,您想要实现什么?
What is your actual code and what are you trying to achieve?
在数字字段上使用like运算符实际上没有任何意义. like运算符通过模式匹配(例如非常简单的正则表达式)进行工作,例如如果要查找所有以"B"开头和以"L"结尾的名称,则可以选择名称" 例如"B%L"".
Using the like operator on a numeric field doesn't really make sense. The like operator works via pattern matching (like a very simple regular expression), e.g. if you want to find all names that begin with 'B' and end with 'L' you could select where "name like 'B%L'".
很明显,这对于数字字段没有多大意义!
Clearly, this doesn't make a lot of sense with a numeric field!
这篇关于无法在system.decimal和system.string上执行“喜欢"操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!