一个nhibenate的hql问题!

from t_mib_item a where instr(substring(a.item_name,5),'.')=0 and a.item_name like 'com.%';

翻译成sql语句
select count(tmibitem0_.ID) as x0_0_ from t_mib_item tmibitem0_, t_mib_item tmibitem1_ where (tmibitem0_.ITEM_NAME like concat('com' , '.%'))and(tmibitem0_.TERM_MODEL_ID=1 , model.id(tmibitem1_.ITEM_NAME like 'com.%' )and(tmibitem1_.TERM_MODEL_ID=1 )and(instr(substring(tmibitem1_.ITEM_NAME , 5), '.')=0 )

中间没有空格了。

请问关于instr的hql语句该如何来写?
posted @ 2007-04-10 08:50  吴建明  阅读(794)  评论(0编辑  收藏  举报