ORA-00979 not a group by expression

后端 未结 8 1734
梦谈多话
梦谈多话 2020-11-21 04:33

I am getting ORA-00979 with the following query:

SELECT cr.review_sk, cr.cs_sk, cr.full_name,
tolist(to_char(cf.fact_date, \'mm/dd/yyyy\')) \"appt\",
cs.cs_i         


        
8条回答
  •  隐瞒了意图╮
    2020-11-21 04:45

    You should do the following:

    SELECT cr.review_sk, 
           cr.cs_sk, 
           cr.full_name,
           tolist(to_char(cf.fact_date, 'mm/dd/yyyy')) "appt",
           cs.cs_id, 
           cr.tracking_number
    from review cr, cs, fact cf
    where cr.cs_sk = cs.cs_sk
           and UPPER(cs.cs_id) like '%' || UPPER(i_cs_id) || '%'
           and row_delete_date_time is null
           and cr.review_sk = cf.review_wk (+)
           and cr.fact_type_code (+) = 183050
    GROUP BY cr.review_sk, cr.cs_sk, cf.fact_date, cr.tracking_number, cs.cs_id, cr.full_name
    ORDER BY cs.cs_id, cr.full_name;
    

提交回复
热议问题