这个oracle语句为何说标识符无效???
selectc.short_nameascustomer_name,sum(o.amount)astotal_amount,count(*)astotal_count,c...
select c.short_name as customer_name,sum(o.amount) as total_amount, count(*) as total_count, c.sales_no_outer as sales_no_outer, sum(o.month_commission) as month_commission,
round(o.month_commission*sr.commission_rate,2) as SERVICER_COMMISSION
from pos_order o ,customer c,servicer sr where 1=1 and o.customer_no = c.customer_no
and c.servicer_id = sr.id and o.status in('SETTLED','SUCCESS') group by c.short_name,SERVICER_COMMISSION,c.sales_no_outer
三个表,六个字段,最后一个是round合成的。问题就来了,为何我的group by三个字段时,会报错,server_commisson这个字段说标识符无效。。。 展开
round(o.month_commission*sr.commission_rate,2) as SERVICER_COMMISSION
from pos_order o ,customer c,servicer sr where 1=1 and o.customer_no = c.customer_no
and c.servicer_id = sr.id and o.status in('SETTLED','SUCCESS') group by c.short_name,SERVICER_COMMISSION,c.sales_no_outer
三个表,六个字段,最后一个是round合成的。问题就来了,为何我的group by三个字段时,会报错,server_commisson这个字段说标识符无效。。。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询