Jens,

I beg your pardon, but, what's the use of having such nested queries ?

In this sample, wouldn't:

select id, name
        from employee_table
        where department_id in (
                select id
                        from department_table
                )

be simpler ? Not to mention that a simple join would do this sample quite as
well (and faster too).

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Jens Lorenz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 6:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SQLTransformer, multiple execute-query siblings?
>
>
> ----- Original Message -----
> From: "Jens Lorenz" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 21, 2002 4:40 PM
> Subject: Re: SQLTransformer, multiple execute-query siblings?
>
>
> > From: "Argyn Kuketayev" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 21, 2002 4:27 PM
> > Subject: RE: SQLTransformer, multiple execute-query siblings?
> >
> >
> > > it doesn't support two nested queries on the same level of nesting, as
> > far
> > > as I remember after looking at C2.0.1 sources. I don't think it's
> fixed.
> > >
> > > Workaround is:
> > > 1. modify source codes
> >
> > The problem is, that it's not that easy. Transformer gets fed
> > SAX events and according to this spits out SAX events.
> >
> > If you want to reference the produced output you would have to
> > remember the output somehow which would make this beast far
> > more complex than it already is.
> >
> > If you really wanna do this, go ahead, but expect some work
> > ahead (SQLTransformer is kind of an orphaned anyway).
> > Otherwise go for XSP/ESQL.
> >
>
> I've to correct me on this one. My short looks into the source
> were obviously not enough ...
>
> This example is taken from
> http://xml.apache.org/cocoon/userdocs/transformers/sql-transformer.html
>
> <example>
>
>       <page xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
>         <execute-query xmlns="http://apache.org/cocoon/SQL/2.0";>
>          <query name="department" >
>               select id,name from department_table
>          </query>
>          <execute-query>
>           <query name="employee">
>            select id,name from employee_table where department_id =
>              <ancestor-value  sql:name="id" sql:level="1"/>
>           </query>
>          </execute-query>
>         </execute-query>
>       </page>
>
> </example>
>
> So according to the user docs this *is* possible. (Haven't testet it
> though)
>
>
> Regards,
>
>
> Jens
>
> --
>
> jens.lorenz at interface-projects dot de
>
> interface:projects GmbH                             \\|//
> Tolkewitzer Strasse 49                              (o o)
> 01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~
> Germany
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to