我遇到了和this post类似的情况。我的伪代码是
string hql = "select ai from AreaInfo as ai where ai.PhoneSegment is substring of :InputPhoneNumber";使用like不会起作用,因为Like正在做的是
string hql = "select ai from AreaInfo as ai where :InputPhoneNumber is substring of ai.PhoneSegment";那么,执行此任务的正确语法是什么?我的环境是NHibernate之上的Castle ActiveRecord。提前谢谢。
发布于 2010-09-04 05:32:38
我相信你正在尝试这样做:
select ai from AreaInfo ai where :InputPhoneNumber like concat('%', ai.PhoneSegment)是这样吗?
https://stackoverflow.com/questions/1919520
复制相似问题