Hi,
I am not able to get count of distinct of 2 columns using hql.
This is the query:
select count ( distinct emp.id ||','|| emp.name ) from com.Employee emp
This exception is coming when i am execuing it:
2013-05-21T13:51:19.829+0530 ERROR line 1:33: expecting CLOSE, found '||'
2013-05-21T13:51:19.834+0530 DEBUG line 1:33: expecting CLOSE, found '||'
line 1:33: expecting CLOSE, found '||'
at antlr.Parser.match(Parser.java:211)
at org.hibernate.hql.antlr.HqlBaseParser.aggregate(HqlBaseParser.java:4401)
at org.hibernate.hql.antlr.HqlBaseParser.identPrimary(HqlBaseParser.java:4052)
at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:861)
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3438)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3216)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3098)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2818)
Can somebody please tell the solution for this.