This JDBC tutorial and
this Java CSV file manipulation tutorial would be a good place to start.
There are dozens of examples just like this all over the web. The above are two hits I got right off the bat via Google.
In a nutshell, use JDBC to connect to your database and obtain a ResultSet. Iterate over your ResultSet and use either JDBC again, or a straight file output using the Java IO API to generate your CSV file.
Also, I think your name is against the Java Ranch naming policy. You may want to update it before one of the moderators notice.

EDIT: Too late.
[ June 02, 2006: Message edited by: Jody Brown ]