cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephanie Zohner" <stephanie.zoh...@gmx.at>
Subject SQL-Transformer: SQL query with multiple statements
Date Thu, 27 Mar 2008 16:19:27 GMT
Hi all, back in the forum after a long time, but I never left you ;-)

I am stuck with the SQL-Transformer.

I would like to perform the same sql-statement (a complex select-statement with a timestamp
as a parameter) several times whereupon the timestamp is always different. I thought of doing
this with a REPEAT or LOOP statement.
But how to do this with SQL-Transformer?

I would like to do something like:

<sql:execute-query>
<sql:query name="repeat">

SET @id = 0; 
REPEAT 

 SET @id = @id +1; 
 SELECT person_id, age FROM persons 
 WHERE person_id = @id; 

UNTIL @id &gt; 1000 END REPEAT

</sql:query>
</sql:execute-query>

This however causes an SQL-Error. I guess the problem is that I can not define multiple statements
in one sql-query, right?

Does anyone know a way how to accomplish this?
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx

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


Mime
View raw message