Oracle-navicat可以执行的sql,设计器提示java.lang.NullPointerException

SELECT
        riqi,
        record_date,
        peak_value
FROM
        (
                SELECT
                        riqi,
                        record_date,
                        peak_value,
                        ROW_NUMBER () OVER (
                                PARTITION BY riqi
                                ORDER BY
                                        peak_value DESC
                        ) AS peak_value_order
                FROM
                        (
                                SELECT
                                        *
                                FROM
                                        (
                                                SELECT
                                                        A .*, TO_DATE (
                                                                SUBSTR (A .record_date, 1, 10),
                                                                'yyyy-mm-dd'
                                                        ) riqi
                                                FROM
                                                        RPT_ONLINE_PEAK A
                                                WHERE
                                                        record_date >= (TRUNC(SYSDATE, 'iw') - 7)
                                                AND record_date <= (TRUNC(SYSDATE, 'iw') - 2)
                                                ORDER BY
                                                        record_date ASC
                                        )
                        )
        )
WHERE
        peak_value_order < 2

上面的语句在Navicat中执行是有结果的

放到设计器中建立数据集时提示报错:

警告:java.lang.NullPointerException
        at java.util.concurrent.FutureTask.report(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at javax.swing.SwingWorker.get(Unknown Source)
        at com.fr.design.data.datapane.preview.PreviewTablePane$7.done(Unknown Source)
        at javax.swing.SwingWorker$5.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
        at sun.swing.AccumulativeRunnable.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.WaitDispatchSupport$2.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.WaitDispatchSupport.enter(Unknown Source)
        at java.awt.Dialog.show(Unknown Source)
        at java.awt.Component.show(Unknown Source)
        at java.awt.Component.setVisible(Unknown Source)
        at java.awt.Window.setVisible(Unknown Source)
        at java.awt.Dialog.setVisible(Unknown Source)
        at com.fr.design.data.datapane.preview.PreviewTablePane.previewTableData(Unknown Source)
        at com.fr.design.data.datapane.preview.PreviewTablePane.previewTableData(Unknown Source)
        at com.fr.design.data.tabledata.tabledatapane.DBTableDataPane$PreviewAction.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
        at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.WaitDispatchSupport$2.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.WaitDispatchSupport.enter(Unknown Source)
        at java.awt.Dialog.show(Unknown Source)
        at java.awt.Component.show(Unknown Source)
        at java.awt.Component.setVisible(Unknown Source)
        at java.awt.Window.setVisible(Unknown Source)
        at java.awt.Dialog.setVisible(Unknown Source)
        at com.fr.design.data.datapane.TableDataTreePane.dgEdit(Unknown Source)
        at com.fr.design.data.datapane.TableDataTreePane$TDAction.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
2016-02-26 11:18:50
正常:错误代码:1301 数据集配置错误 Query: ORA-01861: 文字与格式字符串不匹配

我是sql小白,求兄弟们帮忙看看我的建数据集的语句要怎么修改才合适

FineReportqwert 发布于 2016-2-26 11:18
悬赏:0 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
静听禅鸣发布于2016-2-26 11:18(编辑于 2023-9-6 09:34)
555
  • qwert qwert(提问者)

    谢谢帮助,我自己瞎鼓捣弄好了。
    TO_DATE ( SUBSTR (A .record_date, 1, 10), \'yyyy-mm-dd\' )这个语句设计器校验不通过,我改成to_char(a.record_date,\'yyyy-mm-dd\')就好了
    回复
    2016-02-26 13:33 
最佳回答
0
静听禅鸣发布于2016-2-26 11:24(编辑于 2023-9-6 09:34)
555
最佳回答
0
qwert发布于2016-2-26 13:33(编辑于 2023-9-6 09:34)
555
  • 0关注人数
  • 3103浏览人数
  • 最后回答于:2016-2-26 13:33
    活动推荐 更多
    热门课程 更多
    返回顶部