易截截图软件、单文件、免安装、纯绿色、仅160KB

nhibernate调用mysql函数问题 - .NET技术 / C#

我需要使用nhibernate调用mysql函数,类似的sql语句:
select * from concat(',', ServiceCodes, ',') like '%,33,%';
或select * from (','||ServiceCodes||',') like '%,33,%';

所以我就这样调用:
//.....
C# code:

or.Add(Restrictions.Like(Projections.SqlFunction("concat", NHibernateUtil.String, Projections.Property("ServiceCodes")), "%," + item + ",%"));


//....

Projections.SqlFunction函数第三个参数是params IProjection[] projections,但是对于逗号(,)我不知道怎么创建IProjection类似。


请各位指教。。。


select * from concat(',', ServiceCodes, ',') like '%,33,%';
或select * from (','||ServiceCodes||',') like '%,33,%';

->

select * from table where concat(',', ServiceCodes, ',') like '%,33,%';
或select * from table where (','||ServiceCodes||',') like '%,33,%';


等待答案。
另一地址:http://stackoverflow.com/questions/2680116/invoke-sql-function-using-nhibernate

可怜,没人理.........

渺茫的顶一下...



没有结果,不满意结账


相关问答:

利用C#编写txt转化到xml的程序

txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......

mysql字段提取 - 其他数据库开发 / MySQL/Postgresql

各位兄弟请教 下,在mysql中能不能实现这样一个功能,
一个字段A是储存一大段文字内容的,是英文,能不能通过MYSQL的查询之类的功能,来获得这个字段中 出现频率最高的十个单词,并将这十个单词做为新的字段储存
a ......

mysql问题! - Java / Java SE

String sqlCount="select count(*) from usertable where username='"+
userName+"'";这句话 什么意思啊!
这句话输出出来就是
select count(*) from usertable where username='你的变量 ......

XmlDocument如何生成闭合标记的XML - .NET技术 / C#

我用XmlDocument生成XML
XmlElement remarkNode = node.OwnerDocument.CreateElement("remark");
remark1Node.InnerXml = "";
如果InnerXml赋值不为空,则生成的标记是没问题的,比如:<r ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号