Mart1n_ 2016-09-22 03:47 采纳率: 100%
浏览 2648
已采纳

java.sql.SQLSyntaxErrorException: ORA-00907: 缺失右括号

select * from (

select a.*, ROWNUM rnum from (

select * from SHOP_ORDER
WHERE start_date between to_date(‘2016-08-22 11:34:36’,'yyyy/mm/dd hh24:mi:ss')

and close_date between to_date('2016-09-22 11:34:36','yyyy/mm/dd hh24:mi:ss') ) a where ROWNUM< ?) where rnum >= ?

求各位大神大牛帮帮小弟!!!!

  • 写回答

7条回答 默认 最新

  • 冬天太冷 2016-09-22 04:03
    关注

    ‘2016-08-22 11:34:36’ 此处标点符号打错了。用的中文的
    后一个between没有and

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • Zedee 2016-09-22 03:47
    关注

    有中文单引号,不知道是不是这个原因

    评论
  • threenewbee 2016-09-22 03:49
    关注

    between需要and匹配

    评论
  • as64544556 2016-09-22 03:50
    关注

    1.第一处单引号是中文的符号,要改成因为的
    2.语法为 字段 between 数值a and 数值b 你这两个between很明显错了

    评论
  • threenewbee 2016-09-22 03:51
    关注

    另外‘2016-08-22 11:34:36’的前后引号都写成全角了。

    评论
  • Mart1n_ 2016-09-22 03:57
    关注

    select * from ( select a.*, ROWNUM rnum from ( select site_code,shop_order,target_qty,start_date,close_date,sales_order,customer_code,item_code,status ,remark,create_by,create_time,update_by,update_time from SHOP_ORDER WHERE shop_order = ? and start_date between to_date(?,'yyyy/mm/dd hh24:mi:ss') and close_date between to_date(?,'yyyy/mm/dd hh24:mi:ss') and status = ? ) a where ROWNUM < ?) where rnum >= ?

    评论
  • 泰 戈 尔 博客专家认证 2016-09-22 05:41
    关注
     (‘2016-08-22 11:34:36’,'y
    

    标点符号错咯

    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 c++图Djikstra算法求最短路径
  • ¥15 Linux操作系统中的,管道通信问题
  • ¥15 ansible tower 卡住
  • ¥15 等间距平面螺旋天线方程式
  • ¥15 通过链接访问,显示514或不是私密连接
  • ¥100 系统自动弹窗,键盘一接上就会
  • ¥50 股票交易系统设计(sql语言)
  • ¥15 调制识别中这几个数据集的文献分别是什么?
  • ¥15 使用c语言对日志文件处理
  • ¥15 请大家看看报错原因,为啥会这样