This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have been working on jasper report. I am trying to execute the report within a java file. In order to do this, I need to execute sql statement within java. I wish to know how we can store multiple sql statements and execute them later? I have 3 statements to be executed. "select COUNT(*) from employee", "select COUNT(*) from employer" and "select COUNT(*) from company" How should I amend my code in order to execute all 3 queries? How should I map the stored data? Please suggest/help. Following is my code. Thank you.
Thank you for responding to the topic. I am generating a report of the records using ireport. It is not possible to use multiple select queries in ireport. Therefore, I need to use java in order to execute those queries. I am trying to get the counts of the tables initially and later I wish to crosscheck them while exporting data to the destined table. For e.g if i delete some records from a table. Then those counts should explain that how many record counts were deleted. In order to execute those queries, i need to store them in a set. Here I am little confused; how to do that? Thank you.