export a table generated via SQL to a csv file

I am using the Bob Swift SQL and I want the user to have the option to be able to export the data from the table to a csv file.  I have tried the CSV Table Export Macro add-on but I randomly get an error message from it.  What other options do I have.

1 answer

2 votes

Hi team,

I usually export the contents of a query into a CSV directly in the query execution like the example noted in this forum:

SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

I believe that since you want a user to do this activity, you would not like him to access the database itself, correct?

In this case, if a macro cannot provide this functionality, then it might not be possible. I'll leave this question open so others can participate and give their thoughts as well.

Cheers,

Rodrigo

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 8 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

85 views 2 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you