就是这种用法是不是不支持啊,应该怎么修改以下?GROUP BY fun(:stat_date,to_char(datttt, 'yyyy-mm-dd'))

解决方案 »

  1.   

    fun是一个函数? 我好像没见过啊?
      

  2.   

    不能这么玩吧,group by 后面得是table 列吧~
      

  3.   

    group by 使用自定义函数时,参数只能用表中的字段吧,否则的话也没有意义哦。。
      

  4.   

    group by的内容需要在select结果集中出现
      

  5.   


    不是啊,select集中包含该列就可以啊,比如 select fun(:stat_date,to_char(datttt, 'yyyy-mm-dd')) 
      

  6.   


    这个知道的,也写了,不过还是不行,主要问题是在这里fun(:stat_date,to_char(datttt, 'yyyy-mm-dd')) 
    fun(‘25’,to_char(datttt, 'yyyy-mm-dd'))  就没问题
      

  7.   


    fun(:stat_date,to_char(datttt, 'yyyy-mm-dd')) 
    的问题,
    datttt是表中的字段,
    :stat_date是字符串类型,如果直接写字符串是没有问题的
      

  8.   

    ORA-00979: 不是 GROUP BY 表达式
      

  9.   

    你的这种 需求只能通过动态SQL来操作