I am very new to Apache Derby, and I have a need to export all of the rows from a table into a csv file.
I am using RazorSQL to connect to the database.
What I need to know is if there is an equivalent Derby SQL command to what MySQL does to export data below.
NOTE: VERY IMPORTANT. One of the columns in this database table is defined as an XML datatype. It will NOT work using any kind of wizard to export the data, because the select statement needs to use the 'xmlserialize' statement in the SQL command.
Here is what I want to do, but Derby does not understand the "INTO OUTFILE" statement I am used to using with MySQL.
select
message_id,
msg_schema_id,
user_id,
req_send_time,
destination,
xmlserialize(msg_content as clob) as message,
facility_id
from Audit
into outfile 'd:\csv\audit.csv'
fields terminated by ','
enclosed by '"'
lines terminated by '\n';