Oracle中的Json_object返回ORA-00907:缺少右括号 [英] Json_object in Oracle returns ORA-00907: missing right parenthesis
问题描述
我正在尝试将Oracle表数据转换为JSON文件.我有三个数据库,下面的代码在一个数据库中将输出作为JSON文件提供,而其他两个数据库则抛出ORA-00907: missing right parenthesis error
.
I am trying to convert Oracle table data into JSON files. I have three databases and the below code gives output as JSON file in one DB but the other two databases throw ORA-00907: missing right parenthesis error
.
从语法上讲,这是正确的,因为它在一个DB中给出了输出.不明白出了什么问题. 这是在Oracle数据库中,我如何找出那些数据库中安装了哪个版本的Oracle,如果它们是12.2及更高版本,是否有解决此问题的方法?我想要的只是将select语句的输出转换为json文件.预先感谢
Syntactically it is correct, as it gave output in one DB. Don't understand what is going wrong. This is in Oracle DB, How do I find out which version of Oracle is installed in those DB's and if they are 12.2 and above, Is there a way to fix this issue? All I want is to convert the output of a select statement to a json file. Thanks in advance
代码:
SELECT JSON_OBJECT ( 'empid' value eid , 'name' value ename , 'add' value eaddr )
FROM abc.emp
推荐答案
JSON_Object可从Oracle 12.2版获得.
JSON_Object is available from Oracle version 12.2 .
运行查询从v $ version选择*以检查您的oracle版本
Run the query Select * from v$version to check your oracle version
这篇关于Oracle中的Json_object返回ORA-00907:缺少右括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!