<bdo id='guKuA'></bdo><ul id='guKuA'></ul>
    <tfoot id='guKuA'></tfoot>

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

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

        如何在 PL/SQL 中按每天分组?

        How to group by each day in PL/SQL?(如何在 PL/SQL 中按每天分组?)
        <i id='XMhnJ'><tr id='XMhnJ'><dt id='XMhnJ'><q id='XMhnJ'><span id='XMhnJ'><b id='XMhnJ'><form id='XMhnJ'><ins id='XMhnJ'></ins><ul id='XMhnJ'></ul><sub id='XMhnJ'></sub></form><legend id='XMhnJ'></legend><bdo id='XMhnJ'><pre id='XMhnJ'><center id='XMhnJ'></center></pre></bdo></b><th id='XMhnJ'></th></span></q></dt></tr></i><div id='XMhnJ'><tfoot id='XMhnJ'></tfoot><dl id='XMhnJ'><fieldset id='XMhnJ'></fieldset></dl></div>
        <tfoot id='XMhnJ'></tfoot>

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

          <tbody id='XMhnJ'></tbody>

                • <bdo id='XMhnJ'></bdo><ul id='XMhnJ'></ul>

                • <legend id='XMhnJ'><style id='XMhnJ'><dir id='XMhnJ'><q id='XMhnJ'></q></dir></style></legend>

                  本文介绍了如何在 PL/SQL 中按每天分组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 PL/SQL 获取每天的统计数据.

                  Im trying to get statistics for each day with PL/SQL.

                  每天都有几个条目,错误的 :-) 我想按天对它们进行分组.

                  Each day have several entries, bukkets of errors :-) I want to group them by day.

                  我目前在做什么:

                  SELECT TO_CHAR(dateTime, 'DD') DAY, TO_CHAR(dateTime, 'MM') MONTH, errormessage
                  FROM log
                  WHERE (...)
                  GROUP BY MONTH, DAY, errormessage
                  

                  这会导致 ORA-00904:DAY":无效标识符(在 group by 上停止).

                  This results in ORA-00904: "DAY": invalid identifier (stops on the group by).

                  有什么帮助吗?:D

                  推荐答案

                  SELECT TO_CHAR(dateTime, 'DD') DAY, TO_CHAR(dateTime, 'MM') MONTH, errormessage
                  FROM log
                  WHERE (...)
                  GROUP BY TO_CHAR(dateTime, 'DD'), TO_CHAR(dateTime, 'MM'), errormessage
                  

                  列别名不适用于GROUP BY,你需要完整的表达式.

                  Column aliases are no good for GROUP BY, you need the full expression.

                  这篇关于如何在 PL/SQL 中按每天分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)

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

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

                            <tbody id='UYeg4'></tbody>