× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<disclaimer>I posted this message on comp.sys.ibm.as400.misc too: sorry for the cross-post, but that newsgroup seems a bit negleted</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?

Thanks!

Bye

Franco

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.francolombardo.net
Scala, Java, As400.....
http://twitter.com/f_lombardo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.