<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 中按每天分组?

        时间:2023-11-02
        <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 中按每天分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PL/SQL Developer 中执行过程的问题 下一篇:在删除不存在的序列、创建现有用户时防止出错

                  相关文章

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