日期:2014-05-17  浏览次数:20716 次

求一oracle查询语句
某个表中的字段order_no in (select order_no from 表a),如果order_no为空的话,希望是old_order_no in (select order_no from 表a),请问如何实现呢?O(∩_∩)O谢谢

------解决方案--------------------
DECODE(ORDER_NO,'',OLD_ORDER_NO,ORDER_NO) IN (SELECT ORDER_NO FROM table a)