Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 70902 invoked by uid 500); 25 Apr 2002 12:36:47 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 70887 invoked from network); 25 Apr 2002 12:36:46 -0000 Message-ID: <3CC7F841.4520D71B@opencascade.com> Date: Thu, 25 Apr 2002 16:36:17 +0400 From: KOZLOV Roman Organization: DATAVISION CIS X-Mailer: Mozilla 4.73 [en] (WinNT; I) X-Accept-Language: fr,en,ru MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: Returning result from two select statements in one file References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, what about such XSLT: Best regards Roman "Hahn Kurt (CHA)" wrote: > The query I tested is a simple "select -from - where" statement (useless to > send you that), here's an example of what I get with this query: > > > Mr. Brown > John > green > > > > Mr. Brown > John > red > > > > Mr. Brown > John > yellow > > > because Mr. Brown has many favourite colors.... > But I should get something like this (which I could do in a PL/SQL block, > but how can I achieve this through Cocoon??) > > > Mr. Brown > John > green > red > yellow > > > > -----Message d'origine----- > De : Luca Morandini [mailto:luca.morandini1@tin.it] > Envoye : jeudi, 25. avril 2002 11:39 > A : cocoon-users@xml.apache.org > Objet : RE: Returning result from two select statements in one file > > Kurt, > > I beg your pardon, but I haven't understood it yet... are you talking about > a sub-query or the processing of a cursor ? > > May you just show us the query you've already tested ? > > Best regards, > > --------------------------------------------- > Luca Morandini > GIS Consultant > lmorandini@ieee.org > http://utenti.tripod.it/lmorandini/index.html > --------------------------------------------- > > > -----Original Message----- > > From: Hahn Kurt (CHA) [mailto:kurt.hahn@etat.ge.ch] > > Sent: Thursday, April 25, 2002 11:01 AM > > To: 'cocoon-users@xml.apache.org' > > Subject: RE: Returning result from two select statements in one file > > > > > > It is not really an issue about SQL, but the question is how I do > > in Cocoon > > what I normally would have to do in a stored procedure: Simply, I can not > > execute one query to get all my results, I need two select statements that > > are dependent on each other in order to get the combined result. > > Is there a > > possibility to do that? It looks as if map:aggregate is useful only if the > > two queries are independent, but they aren't. > > Example: The first select returns a row, and dependent on the > > result of that > > row, a second select returns zero, one ore more rows that should > > be added to > > the first returned row (as if they belonged to the result from the first > > select..). > > > > Is that understandable? > > KH > > > > > > -----Message d'origine----- > > De : Luca Morandini [mailto:luca.morandini1@tin.it] > > Envoye : jeudi, 25. avril 2002 10:01 > > A : cocoon-users@xml.apache.org > > Objet : RE: Returning result from two select statements in one file > > > > > > Kurt, > > > > it seems to me more of an SQL than a Cocoon issue... may you share your > > query with us ? > > > > Best regards, > > > > > > --------------------------------------------- > > Luca Morandini > > GIS Consultant > > lmorandini@ieee.org > > http://utenti.tripod.it/lmorandini/index.html > > --------------------------------------------- > > > > > > > -----Original Message----- > > > From: Hahn Kurt (CHA) [mailto:kurt.hahn@etat.ge.ch] > > > Sent: Thursday, April 25, 2002 9:26 AM > > > To: 'cocoon-users@xml.apache.org' > > > Subject: Returning result from two select statements in one file > > > > > > > > > I'm developing a Cocoon application wich produces PDF files from a file > > > which is generated by a DB access (Oracle). The problem is the > > query: The > > > results I should get looks like this: > > > > > > > > > text > > > ... > > > text > > > text > > > ... > > > text > > > > > > where "fieldFromSecondSelect" are 0 or more rows which are returned and > > > should be grouped with the main "select". In PL/SQL, I could > > > write a stored > > > procedure with a cursor that's returning me the second result set, but > > > what's the way to do that in Cocoon? So far, I "succeeded" to > > > write a select > > > statement that's returning me all I need, but whenever the sub-select > > > returns more than 1 row, the corresponding result from the main query is > > > returned several times too, like this: > > > > > > > > > text > > > ... > > > text > > > text > > > > > > > > > > > > same text again > > > ... > > > same text again > > > text > > > > > > > > > > > > same text again > > > ... > > > same text again > > > text > > > > > > > > > and so on. This means I would have to sort this multiple fields > > > later, in a > > > XSL, but that doesn't seem a very smart thing to do, I guess. > > > > > > Any suggestions? > > > > > > KH > > > > > > --------------------------------------------------------------------- > > > Please check that your question has not already been answered in the > > > FAQ before posting. > > > > > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. > > > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. > > > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. > > To unsubscribe, e-mail: > For additional commands, e-mail: > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. > > To unsubscribe, e-mail: > For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: