Export Sql query resultset to a comma separated file using JDBC
I am polling a file from a unix directo开发者_Python百科ry , and creating a external directory using following command, and loading the data in the file as table. Later i am applying where condition on the table and the resultset should be exported as a comma separated csv file using JDBC .kindly let me know is it possible, or please point me to some blog .
Create or replace directory
and
Alter table
Here is a very good starting place. I personnally use some code inspired by their example and it works great to dump a resultset into a SQL file that you can load into a table very easily. You could adapt it to your needs in a few minutes.
精彩评论