<legend id='qMs3w'><style id='qMs3w'><dir id='qMs3w'><q id='qMs3w'></q></dir></style></legend>

<tfoot id='qMs3w'></tfoot>

      <small id='qMs3w'></small><noframes id='qMs3w'>

      1. <i id='qMs3w'><tr id='qMs3w'><dt id='qMs3w'><q id='qMs3w'><span id='qMs3w'><b id='qMs3w'><form id='qMs3w'><ins id='qMs3w'></ins><ul id='qMs3w'></ul><sub id='qMs3w'></sub></form><legend id='qMs3w'></legend><bdo id='qMs3w'><pre id='qMs3w'><center id='qMs3w'></center></pre></bdo></b><th id='qMs3w'></th></span></q></dt></tr></i><div id='qMs3w'><tfoot id='qMs3w'></tfoot><dl id='qMs3w'><fieldset id='qMs3w'></fieldset></dl></div>

          <bdo id='qMs3w'></bdo><ul id='qMs3w'></ul>

        ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和

        ORA-01830: date format picture ends before converting entire input string / Select sum where date query(ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和)

        • <bdo id='FnuIv'></bdo><ul id='FnuIv'></ul>
          <i id='FnuIv'><tr id='FnuIv'><dt id='FnuIv'><q id='FnuIv'><span id='FnuIv'><b id='FnuIv'><form id='FnuIv'><ins id='FnuIv'></ins><ul id='FnuIv'></ul><sub id='FnuIv'></sub></form><legend id='FnuIv'></legend><bdo id='FnuIv'><pre id='FnuIv'><center id='FnuIv'></center></pre></bdo></b><th id='FnuIv'></th></span></q></dt></tr></i><div id='FnuIv'><tfoot id='FnuIv'></tfoot><dl id='FnuIv'><fieldset id='FnuIv'></fieldset></dl></div>

          1. <tfoot id='FnuIv'></tfoot>
              <tbody id='FnuIv'></tbody>

              <legend id='FnuIv'><style id='FnuIv'><dir id='FnuIv'><q id='FnuIv'></q></dir></style></legend>

              1. <small id='FnuIv'></small><noframes id='FnuIv'>

                  本文介绍了ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试通过 Java 执行我的查询,如下所示:

                  I am trying to execute my query through Java like this:

                  public ResultSet execSumStatment2() throws SQLException{
                  String query = "Select SUM(A) as NCCSeptember from NCC where Datum >= '01-09-2013 00:00:00' and Datum <= '30-09-2013 23:59:59'";
                  return execStatement(query);
                  }
                  

                  然后我在类中调用execSumStatement:

                  Then i call execSumStatement in the class:

                  sql.execSumStatement2 () ;
                  

                  当我运行它时,我收到以下错误消息:

                  When I run it I get the following error message:

                  java.sql.SQLDataException: ORA-01830: 日期格式图片在转换整个输入字符串之前结束

                  java.sql.SQLDataException: ORA-01830: date format picture ends before converting entire input string

                  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
                  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
                  at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
                  at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
                  at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
                  at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
                  at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
                  at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
                  at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
                  at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
                  at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
                  at com.bachelorarbeit.SQLExecutor.execStatement(SQLExecutor.java:20)
                  at com.bachelorarbeit.SQLExecutor.execSumStatment2(SQLExecutor.java:56)
                  at com.bachelorarbeit.Test.doGet(Test.java:63)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
                  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
                  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
                  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
                  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                  at java.lang.Thread.run(Unknown Source)
                  

                  当我在 SQL Developer 中执行相同的查询时,它工作得很好.我已经在互联网上进行了搜索,我猜问题是查询中日期的数据类型,应该是日期,但是我尝试的一切都不起作用......

                  When I execute the same query in SQL Developer it works just fine. I already made a search over the internet, and I guess the problem is the datatype of the date in the query, which should be Date, but everything I tried didn't work...

                  我是编程的初学者,所以如果你能尽可能简单地解释它会很棒!提前致谢!

                  I'm a beginner in programming so it would be great if you could explain it as simple as possible! Thanks in advance!

                  推荐答案

                  我认为你不应该依赖隐式转换.这是一个不好的做法.

                  I think you should not rely on the implicit conversion. It is a bad practice.

                  相反,您应该像这样尝试:

                  Instead you should try like this:

                  datenum >= to_date('11/26/2013','mm/dd/yyyy')
                  

                  或者喜欢

                  datenum >= date '2013-09-01'
                  

                  这篇关于ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  sqlite select with condition on date(sqlite 选择日期条件)
                  parameter unsupported when inserting int in sqlite(在sqlite中插入int时不支持参数)
                  How to read datetime back from sqlite as a datetime instead of string in Python?(如何从sqlite读取日期时间作为日期时间而不是Python中的字符串?)
                  How do DATETIME values work in SQLite?(DATETIME 值如何在 SQLite 中工作?)
                  How do I insert datetime value into a SQLite database?(如何将日期时间值插入 SQLite 数据库?)
                  How to get Top 5 records in SqLite?(如何获得 Sqlite 中的前 5 条记录?)
                  <tfoot id='9VePh'></tfoot>

                    <legend id='9VePh'><style id='9VePh'><dir id='9VePh'><q id='9VePh'></q></dir></style></legend>
                    <i id='9VePh'><tr id='9VePh'><dt id='9VePh'><q id='9VePh'><span id='9VePh'><b id='9VePh'><form id='9VePh'><ins id='9VePh'></ins><ul id='9VePh'></ul><sub id='9VePh'></sub></form><legend id='9VePh'></legend><bdo id='9VePh'><pre id='9VePh'><center id='9VePh'></center></pre></bdo></b><th id='9VePh'></th></span></q></dt></tr></i><div id='9VePh'><tfoot id='9VePh'></tfoot><dl id='9VePh'><fieldset id='9VePh'></fieldset></dl></div>

                            <tbody id='9VePh'></tbody>
                            <bdo id='9VePh'></bdo><ul id='9VePh'></ul>

                          • <small id='9VePh'></small><noframes id='9VePh'>