Hello,
I'm trying to run following SQL query:
SELECT
ID,
BROKER_NAME AS B,
CSV_REG_EX AS C,
ACTIVE
FROM
APP.BROKERS
FOR UPDATE OF
B,
C,
ACTIVE;
and get this error.
[Exception, Error code 30,000, SQLState 42X04] Column 'B' is either not
in any table in the FROM list or appears within a join specification and
is outside the scope of the join specification or appears in a HAVING
clause and is not in the GROUP BY list. If this is a CREATE or ALTER
TABLE statement then 'B' is not a column in the target table.
Line 1, column 1
Derby 10.15.1.3 is running on openJDK12 within Netbeans 11.0.
When I remove the alias for BROKER_NAME AND CVS_REG_EX it works.
Reading the documentation my understanding is that FOR UPDATE should
also work with aliased columns.
Any advise is appreciated.
Thanks and best regards
Martin