You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by tushar m <ch...@yahoo.com> on 2005/09/16 14:15:01 UTC

Question: SELECT from table1, (select .....)

Hi,

Had a question regarding nested queries in OJB.
We are using a similar kind of query as mentioned
below

SELECT D. X, D.Y FROM 
            table1, 
           (SELECT A as X, B as Y, C as Z FROM table2
where Q like '%T%' AND P > 10 ) D,
           (SELECT A as R, B as S, F as U FROM table2
where Q like '%U%') E
    
 WHERE  D.X = E.R         
         AND table1.G IS NOT NULL


This is not the complete query , actually the query is
a little more complex!! 
The question we have is whether OJB supports these
kinds of queries [3 tables in the FROM clause. Two of
these D and E are actually aliases from sub-queries].
Were trying to use the OJB Query API [ReportQuery etc]
but still are unable to figure out how this can be
accomplished. Reference from the OJB Query
Documentation was also not quite helpful.

Any ideas whether such scenarios are supported through
the API's ? 

Regards,

Tushar

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org