select phonedata.dnis, 
       sum(phonedata.timelen) as totaltimelen,
       sum(phonedata.moneys) as totalmoneys, 
       sum(phonedata.realmoneys) as totalrealmoneys, 
       phone_path.company 
       FROM phonedata ,phone_path 
       where phonedata.dnis = phone_path.haoma 
       group by phonedata.dnis,phone_path.company 这样写不行么

解决方案 »

  1.   

    这条语句在SQL里执行起来一点问题都没有,字段都显示值,怎么到了oracle里就不显示另一个表的字段值很纳闷
      

  2.   

    sxykje(我爱老婆)确实如此,刚试完
      

  3.   

    晕,我在我这里试了都可以的
    有满足where条件 的记录么?
      

  4.   

    怎么会你那行呢?我下午的时候试过你给的那个语句不行的呀
    select phonedata.dnis, sum(phonedata.timelen) as totaltimelen, sum(phonedata.moneys) as totalmoneys, sum(phonedata.realmoneys) as totalrealmoneys, phone_path.company FROM phonedata LEFT OUT JOIN phone_path ON phonedata.dnis = phone_path.haoma where starttime>'2006-07-26 00:00:00' and starttime<'2006-07-26 23:59:59' and dnis like '96282%' and endtime is not null and dept is not null group by phonedata.dnis,phone_path.company order by totalrealmoneys desc 这句能查出数据,但就是那个company不显示
      

  5.   

    有满足where条件 的记录啊