csv

Exporting CSV data from Virtuoso

Submitted by admin on Mon, 02/08/2016 - 15:39

To export csv

cbw.DBA.csvExport('SELECT * FROM cbw.DBA.mytable', '/Users/asanchez75/Trash/instances.csv');

To import csv
csv_load_file('/Users/asanchez75/Trash/myfile.csv',0, null, 'cbw.DBA.mytable');

You must create the procedure before

<code>
create procedure
exmo.DBA.csvExport( IN in_query VARCHAR, IN filename VARCHAR )
{

declare query varchar;
query := split_and_decode(in_query,0,'%');

file_delete(filename,1);

Etiquetas