Hello Everybody!
when I try to implement some authorisation in my query for the select list, I receive an error message during runtime:
ORA-20987: APEX - Fehler beim Verarbeiten der Validierung. - ORA-06550: line 3, column 1: PLS-00428: an INTO clause is expected in this SELECT statement
The query of the select list is the following:
-- Der Anwender darf nur Anwender 'berollen', die eine Rollennummer haben, die höher ist, als die des aktuell
-- angemeldeter Anwender.
SELECT tu_anrede || ' ' || tu_vorname || ' ' || tu_nachname || ' [' || tu_username || ']' AS d
, tu\_username AS r
FROM top_user
WHERE tu_username IN (SELECT tu_username
FROM top\_user\_rolle
WHERE tr\_rol\_nr > (SELECT MIN (tr\_rol\_nr)
FROM top\_user\_rolle
WHERE tu\_username = :app\_user)
-- only user with a role less than ones own
-- can be granted one role
)
OR tu_username NOT IN (SELECT tu_username -- user without role
FROM top\_user\_rolle
);
Is this error because of length restrictions in a query for select lists in Apex?
When I shorten the query, it works, but returns the wrong result set
SELECT tu_anrede || ' ' || tu_vorname || ' ' || tu_nachname || ' [' || tu_username || ']' AS d
, tu\_username AS r
FROM top_user
; -- works but I cannot leave the rest of the statement as comment in the query, because then, following appears

Thank you very much.
Hans