Xiang·x·L 2015-08-11 02:48 采纳率: 8.3%
浏览 1994
已采纳

求 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) )

  • 写回答

4条回答 默认 最新

  • danielinbiti 2015-08-11 05:16
    关注
    使用to_date日期转换,varchar转date,然后在+7
     select to_date('2004-05-07 13:23:44','yyyy-mm-dd hh24:mi:ss')  + 7  from dual//
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键
  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?