← Winnitude! Search  ·  Reader Mode (1332 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 15 LINKS

[Bug] sqlserver查询聚合函数出错 · Issue #648 · APIJSON/APIJSON

Repository navigation

[Bug] sqlserver查询聚合函数出错  #648


New issue

New issue

Closed
#885
Closed
[Bug] sqlserver查询聚合函数出错 #648 #885 Labels
Config 配置

SQLServer

help wanted

Description

@fengdu126's profile fengdu126 opened on Dec 13, 2023

APIJSON Version/APIJSON 版本号

6.2

Database Type & Version/数据库类型及版本号

sqlserver2012

Environment/环境信息

- JDK/基础库:1.8
- OS/系统:win11

APIAuto Screenshots/APIAuto 请求与结果完整截屏

https://github.com/fengdu126/appokgo/blob/master/c80f2d8b563540fc110e9232b1f3b5d.png

Current Behavior/问题描述

 {
        "Moment": {
             "@column":"max(date):date"
        }
}

返回:{"Moment":{"@column":"max(date):date"},"ok":false,"code":500,"msg":"数据库驱动执行异常SQLException,非 Log.DEBUG 模式下不显示详情,避免泄漏真实模式名、表名等隐私信息"}

log提示:order by 子句 列id无效,因为该列没有包含在聚合函数或group by子句中,

但查max(id)是没有问题的。

Expected Behavior/期望结果

另外希望一条语句能查多个聚合函数,比如: {
        "Moment": {
             "@column":"max(date):date,max(id):id"
        }
}

Any additional comments?/其它补充说明?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels


    Config 配置

    SQLServer

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions