You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Markus Vaterlaus <mv...@gmail.com> on 2005/07/14 11:22:54 UTC

How to query multiple SQL databases

Dear Cocooners

I'm facing the following problem, and I'm a bit clueless which way is
the best to solve it. Therefore I'm interested on your thoughts and
experiences regarding such a problem.

The problem:
* I have n databases to query
* The query on each database is the same
* The number (n) of databases has to be evaluated at run time
* The databases can be accessed by dblink
* The name of the databases to query are stored in another table
* A single request from a web page should start all queries
* The result of all queries is displayed on one web page
* A single query could look like this
  <esql:execute-query>
      <esql:query>
        SELECT * FROM table_abc@db_name
       </esql:query>
       <esql:results>
            ...
        </esql:results>
    </esql:execute-query>

As a solution I can think of a subquery in SQL or using xsp-logic.
What are your thoughts?

Cheers

--mv

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org