Dynamic csv url

41 views
Skip to first unread message

Ivan Kovalenko

unread,
Dec 3, 2014, 3:37:30 AM12/3/14
to scrip...@googlegroups.com
Hi!

Could anyone provide a way to search for solution with the next problem.
We would like to export details data from database to csv, but separated into csv files according to primary key of the master table. Something like this
<query connection-id="db">
select pk_column from master_table

<query connection-id="db">
select * from details_table where fk_column = ${pk_column}
<script connection-id="table.csv.${pk_column}">
$1
,$2,$3,$4
</script>
</query>
</query>

But connection is defined only once and could not be redefined, thus the question is how to dynamically change output file name?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages