ORA-00933: SQL 命令未正确结束select distinct YEARMONTH, substr(YEARMONTH,1,4) || '年' || substr(YEARMONTH,5,2) || '月' as year_month from CLASSTOTALCOST order by YEARMONTH
UNION
select distinct year_month, substr(year_month,1,4) || '年' || substr(year_month,5,2) || '月' as year_month from invoice_sum order by year_month
UNION
select distinct year_month, substr(year_month,1,4) || '年' || substr(year_month,5,2) || '月' as year_month from invoice_sum order by year_month
UNION
select distinct year_month as YM, substr(year_month,1,4) || '年' || substr(year_month,5,2) || '月' as Y_M from invoice_sum order by year_month
没环境调试,你再自己试试