[英]LOV query is invalid
I am working with APEX 4.2.1.00.08 and I keep getting the validation error " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. ". 我正在使用APEX 4.2.1.00.08,但不断收到验证错误“ LOV查询无效,需要显示和返回值,列名必须不同。如果您的查询包含嵌入式查询, SQL语句中的第一个FROM子句一定不能属于嵌入式查询。 ” I'm not sure what's causing this.
我不确定是什么原因造成的。 My sql is:
我的SQL是:
SELECT u1.name d, susu.subunitid r
FROM basic.subunitsuperunit susu
INNER JOIN basic.unit u1 ON susu.subunitid = u1.unitid
INNER JOIN basic.unit u2 ON susu.superunitid = u2.unitid
WHERE level = 3
AND u1.name != 'XYZ'
CONNECT BY PRIOR subunitid = superunitid
START WITH u1.name = (SELECT u3.name FROM basic.unit u3 WHERE u3.unitid = (SELECT TO_NUMBER(gp.value) FROM basic.global_parameters gp WHERE gp.name = 'A_UNIT'))
ORDER BY u1.name
I have made sure there was no semicolon, and I have checked this query in SQL Developer and it runs fine. 我确保没有分号,并且已经在SQL Developer中检查了此查询,并且运行良好。 I already realize those subqueries aren't optimal, but what am I doing wrong here?
我已经意识到那些子查询不是最佳的,但是我在这里做错了什么?
Try to create an apex_collection or a database view with your query and then create your lov based on the new object. 尝试使用查询创建apex_collection或数据库视图,然后基于新对象创建lov。 I too face same kind of difficulties with other queries and I always solved it so.
我也遇到其他查询同样的困难,我总是这样解决。
This happens also if you begin your query using the WITH clause. 如果使用WITH子句开始查询,也会发生这种情况。 You can wrap the whole lot up with
SELECT name d, ID r From ( your query here )
您可以使用
SELECT name d, ID r From ( your query here )
将全部内容包装起来
I see this post is old, but I ran into the same error in the "Lists of Values" portion of the application. 我看到这篇文章很旧,但是在应用程序的“值列表”部分遇到了相同的错误。 My issue happened to be that a grant was missing for the applicaton's run as user.
我的问题碰巧是该应用程序作为用户运行时缺少授权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.