本帖最后由 无语 于 2015-6-18 11:47 编辑
SELECT d.cell_no,
i.items,
d.operate_time,
d.ivalues,
instr('${槽号}','-')
FROM ADMIN."Z_TECH_PARAMETER_DATA" d,ADMIN."Z_TECH_PARAMETER_ITEM" i
where d.items_id=i.id
and i.items in (${工艺参数})
and d.operate_time >=to_date('${开始日期}','yyyy-MM-dd')
and d.operate_time <=to_date('${结束日期}','yyyy-MM-dd')
and length(d.cell_no)=4
${if(instr('1001-1003')<=4,"and d.cell_no=substr('"+槽号+"',1,4)","and d.cell_no >=substr('"+槽号+"',1,4) and d.cell_no<=substr('"+槽号+"',6,4)")}
|