|
<disclaimer> I posted this message on comp.sys.ibm.as400.misc too:
sorry for the cross-post, but that newsgroup seems a bit neglected
</disclaimer>
I'm trying to support AS400 database in Activiti
(http://www.activiti.org).
This open source project creates lots of query like this:
SELECT SUB.*
FROM
(select RES.* , row_number() over (Order by A.field1) rnk
FROM
(select A.field1, B.field1
from A inner join B on A.X = B.Y
) RES
) SUB
WHERE SUB.rnk >= ? AND SUB.rnk < ?
Unfortunately this query fails with msg SQL5001 - Column qualifier
or table A undefined.
Note that if I change my statement this way:
SELECT SUB.*
FROM
(select RES.* , row_number() over (Order by NEW_NAME) rnk
FROM
(select A.field1 NEW_NAME, B.field1
from A inner join B on A.X = B.Y
) RES
) SUB
WHERE SUB.rnk >= ? AND SUB.rnk < ?
all works fine (but I can't modify Activiti this way :-).
Is it a bug of SQL parser or I don't understand something?
Any suggestion?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.