Surely you are joking Dr Feynman! Apologies to the great man http://www.gorgorat.com/
What about :- SELECT person_id, age FROM persons WHERE person_id between $id and $id + 1000 Alternatively, depending on which DBMS and to give you more flexibility put your SQL in a stored proc and call that SQL is a very powerful declarative set calculus. Don't underestimate it's value ;-) On 27/03/2008, Stephanie Zohner <[EMAIL PROTECTED]> wrote: > > 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 > 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/[EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >