First of all, please be patient and wait at least 24 hours for a reply. People are in time zones and go online at different times around the world.
Second, what have you tried so far. Which of the following do you know how to do?
2) Write the data returned by JDBC as comma separated list.
3) Merge these two.