This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Anyways, where is it that you are facing a problem? Is it reading from the database or writing to a CSV file? Since database access is fairly normal, i assume you would know that. This FAQ entry will give you the details of how to read/write CSV files.