HQl equivalent of sql query
        Posted  
        
            by 
                kash
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by kash
        
        
        
        Published on 2010-12-21T08:56:13Z
        Indexed on 
            2010/12/21
            9:54 UTC
        
        
        Read the original article
        Hit count: 276
        
 String SQL_QUERY = "SELECT count(*) FROM (SELECT * FROM Url as U where U.pageType=" + 1 + " group  by U.pageId having count(U.pageId) = 1)";
query = session.createQuery(SQL_QUERY);
I am getting an error
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1, column 23 [ SELECT count() FROM (SELECT * FROM Url as U where U.pageType = 2 group by U.pageId having count(U.pageId) = 1)]
© Stack Overflow or respective owner