WHERE rownum <= ? MINUS 
Page WHERE rownum < ?]
这是个什么意思?看不懂。
你的这句sql能执行成功。

解决方案 »

  1.   

    ?号是个参数,无所谓的----你就当?号是已知的好啦org.springframework.orm.hibernate 
    Class HibernateTemplate
    public List find(String queryString,
                     Object value)
              throws DataAccessException
    (是这个函数)
    Description copied from interface: HibernateOperations 
    Execute an HQL query, binding one value to a "?" parameter in the query string. Specified by:
    find in interface HibernateOperations
    Parameters:
    queryString - a query expressed in Hibernate's query language
    value - the value of the parameter 
    Returns:
    a List containing the results of the query execution 
    Throws: 
    DataAccessException - in case of Hibernate errors
    See Also:
    Session.find(String, Object, net.sf.hibernate.type.Type), Session.createQuery(java.lang.String)--------------------------------------------------------------------------------
      

  2.   

    SELECT rownum,Page FROM  
    ( select log,latn.LOCATION  from TB_SYS_LOG log,d_latn latn where log.latn_id=latn.local_id  order by log.operate_time desc )
     Page WHERE rownum <= ::'参数1' 
    MINUS 
    SELECT rownum, Page FROM 
    ( select log,latn.LOCATION  from TB_SYS_LOG log,d_latn latn
     where log.latn_id=latn.local_id  order by log.operate_time desc ) 
    Page WHERE rownum < ::参数2
      

  3.   

    allright_flash
    你怎么把我的SQL复制了一遍
      

  4.   

    我知道?是参数,我想问下你的这句sql你传值进来能返回你要的结果吗?
      

  5.   

    lz说的是参数的传递吧?
    hibernate里面已经映射好
    用:连接就可以了。
    SELECT rownum,Page FROM  
    ( select log,latn.LOCATION  from TB_SYS_LOG log,d_latn latn where log.latn_id=latn.local_id  order by log.operate_time desc )
     Page WHERE rownum <= :'参数1' 
    MINUS 
    SELECT rownum, Page FROM 
    ( select log,latn.LOCATION  from TB_SYS_LOG log,d_latn latn
     where log.latn_id=latn.local_id  order by log.operate_time desc ) 
    Page WHERE rownum < :‘参数2‘??
      

  6.   

    第一次做这个,也不清楚,我就想把这个SQL语句改成HQL
    然后试一下
    正在看HQL,头有点大
    所以来这里问问的你能先帮我转换一下吗?