5

求 oracle大神啊 ~~~~~~~~~~~~ create time 加7天如何写

select c.* from crm_order_taobao_opt_history c where c.CREATE_TIME<'当前时间sysdate' and '当前时间sysdate'<'CREATE_TIME加上7天的时间' and c.order_sn like 'TB%' and c.opt_status=12 and not exists (select 1 from crm_order_taobao_opt_history o where c.order_sn=o.order_Sn and o.opt_status=13 ) and ( exists(select 1 from crm_tb_apply_refund_record o where o.order_sn=c.order_sn and o.audit_Result =126080 ) or not exists(select 1 from crm_tb_apply_refund_record o where o.order_sn=c.order_sn ) or exists(select 1 from crm_tb_apply_refund_record o where o.order_sn=c.order_sn and o.audit_Result =126062 and o.last_operate_time is not null and o.last_operate_time<1438162149 and o.cancel_result=40035 and nvl(o.repeat_Count,0)<11) )

查看全部
a1007790170
Xiang·x·L
2015/08/11 02:48
  • oracle
  • sql
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

4个回复