日期:2014-05-17 浏览次数:21072 次
select ROWNUM," +"(case SUBSTR(PLAN_CODE,1,1) when 'A' then '焊装' when 'B' then '涂装' else '总装' end)state," + "PLAN_CODE,PLAN_NAME,PLAN_MODEL,PLAN_BEGIN_DATE,PLAN_QUANTITY,PLAN_ONLINE_QUANTITY,PLAN_OFFLINE_QUANTITY,DDBH " +"from data_plan where PLAN_BEGIN_DATE=to_date('" + date2 + "','yyyy-mm-dd') order by plan_code"
select ROWNUM,t1.* from " +"(select (case SUBSTR(PLAN_CODE,1,1) when 'A' then '焊装' when 'B' then '涂装' else '总装' end)state," + "PLAN_CODE,PLAN_NAME,PLAN_MODEL,PLAN_BEGIN_DATE,PLAN_QUANTITY,PLAN_ONLINE_QUANTITY,PLAN_OFFLINE_QUANTITY,DDBH " +"from data_plan where PLAN_BEGIN_DATE=to_date('" + date2 + "','yyyy-mm-dd') order by plan_code) t1"