gpt4 book ai didi

sql - Oracle SQL 错误 : ORA-00923: From Keyword not found where expected

转载 作者:行者123 更新时间:2023-12-05 08:23:46 25 4
gpt4 key购买 nike

当我对 Oracle 使用以下 sql 命令时:

SELECT CATEGORY,ANTIGENNAME,LATINCOMPOSITION,HYCORCODE,FDACLEARANCE, LISTAGG(ORCHARDCODE, ';')
WITHIN GROUP (ORDER BY ORCHARDCODE) as code
from tablename
group by HYCORCODE

我似乎遇到了 ORA-00923 错误:

ORA-00923: FROM keyword not found where expected

可能导致错误出现的原因是什么?

最佳答案

LISTAGG 在您的 Oracle 版本中不可用。使用此语句检查您的版本:

select * from v$version;

LISTAGG 仅适用于版本 >= 11.2.x

来自 "Oracle Database 11g Release 2 (11.2) New Features in Data Warehousing" :

Analytic Functions

New SQL analytic functions have been introduced that enable you to list (or concatenate) measure values within a group (LISTAGG).

关于sql - Oracle SQL 错误 : ORA-00923: From Keyword not found where expected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35562364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com