如何把a字段值转化为to_number,
如不加以判断,当数据为空时,或当数据为英语字母及非法这母,都会出现的

解决方案 »

  1.   

    where trim(translate(col,'0123456789.','           ')) is null;
      

  2.   

    显示10个字段且显示是重复数据,不用GROUP BY 分组,可有其他更好的方法。谢谢
      

  3.   

    GROUP BY 为何不支持 如 group by *
      

  4.   

    group by * 有什么意义
      

  5.   

    如果取n个字段,那不是把n 个字段都写在group by内,这是不是会造成sql语句效率低呢
      

  6.   

    取 a,b,c,d,e,f,g...字段想在group by 只用 a,c,d进行分组显示列表数据 
    select a,b,c,d,e,f,g... from t1,t2,t3
    where t1.id = t2.id,t1.id2=t3.id2
    group by a,c,d having(count(*))>1  提示缺少表达式
      

  7.   

    分组显示不能这样实现。
    try:
    select a,b,c,d,e,f,g... from t1,t2,t3
    where t1.id = t2.id,t1.id2=t3.id2
    union 
    select distinct a,c,d from t1,t2,t3;
      

  8.   

    sorry!try:
    select a,c,d,b,e,..from t1,t2,t3
    where t1.id = t2.id,t1.id2=t3.id2
    union 
    select distinct a,c,d,'','','',... from t1,t2,t3;
      

  9.   

    谢谢,但用distinct 还是执行效率不高。
    oracle有没有 StringBuffer这个函数。
    因为定义一个函数返回的是string,提示字符文体中字符太多,何有解决。 谢谢