Hello Christian,

that is actually working fine!

Maybe a reason:
The one we started the discussion with:
The first query was based on a ACCESS query and the second was based on a table!

The personnel is based on 2 tables! <- I have put everything in an Access DB to see 
whether it is working!

...what do you thing?

-----Ursprüngliche Nachricht-----
Von: Christian Haul [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 12. März 2003 17:28
An: [EMAIL PROTECTED]
Betreff: Re: nested queries with esql


On 12.Mar.2003 -- 04:54 PM, Scherler, Thorsten wrote:
> 
> Von: Christian Haul [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 12. März 2003 16:51
> An: [EMAIL PROTECTED]
> Betreff: Re: nested queries with esql
> 
> 
> On 12.Mar.2003 -- 04:23 PM, Scherler, Thorsten wrote:
> > select * from ap_tab where ap_id = <esql:parameter
> > type="int"><esql:get-int column="id" ancestor="1"/></esql:parameter>
> >
> > Status => not working! I don't receive any error messages. It is just
> > working without any result (besides CPU-usage 100%). I tried with 2
> > different db (big and small) but neither were working :( -> thanks for
> > the support, anyway. :)
> 
> Just out of curiosity: what DBMSs are you using?
> 
> Ok, promise you will not laugh:
> 
> MS Access <- I have to :(

Could you try to run the following snippet with it? It's tested
against HSQLDB, it needs the personnel connection with the appropriate
content. You should be able to adjust it to your schema and data.

  <esql:connection>
    <esql:pool>personnel</esql:pool>

      <esql:execute-query>
        <esql:query>
          SELECT name, id FROM department ORDER BY name
        </esql:query>
        <esql:results>
          <esql:row-results>

            <h2><esql:get-string column='name'/></h2>
            
            <esql:execute-query>
               <esql:query>
                  SELECT name FROM employee 
                  WHERE department_id = 
                     <esql:parameter type="int"><esql:get-int column="id" 
ancestor="1"/></esql:parameter>
                     <!-- note: no spaces between esql:parameter and esql:get-int -->
               </esql:query>
               <esql:results>
                  <esql:row-results>

                      <para><esql:get-string column='name'/></para>

                  </esql:row-results>
               </esql:results>
            </esql:execute-query>

          </esql:row-results>
        </esql:results>
      </esql:execute-query>

     </esql:connection>


        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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


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

Reply via email to