You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by montechristos <mo...@gmail.com> on 2011/11/23 17:33:49 UTC

SQL task and iterating over results

Hello,

I have a small script that queries a DB to get some IDs.
I would like to iterate over the result set (using ant 'for' task) without
saving the results to a file.

Can somebody provide some hints?

Thanks

--
View this message in context: http://ant.1045680.n5.nabble.com/SQL-task-and-iterating-over-results-tp5017227p5017227.html
Sent from the Ant - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: SQL task and iterating over results

Posted by montechristos <mo...@gmail.com>.
And the code is like this:

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="Test" >
	<target name="Test">
		<sql
			driver="oracle.jdbc.OracleDriver"
			url="jdbc:oracle:thin:@server:1521:FCDEV"
			userid="x"
			password="x"
			print="yes">
			<classpath>
				<pathelement location="ojdbc6.jar"/>
			</classpath>
			select ID from OPERATIONPLANHEADER
		</sql>

		<for list="???" delimeter="???" param="???">
			<sequential>
			    ....
			</sequential>
		</for>
	</target>
</project>

--
View this message in context: http://ant.1045680.n5.nabble.com/SQL-task-and-iterating-over-results-tp5017227p5017234.html
Sent from the Ant - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org