Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Automate SQL to run and populate a spreadsheet

ramanm's profile image ramanm posted 5 years ago in Running SQL scripts Permalink

Morning All,

I need to automate a piece of SQL which will run and then populate a spreadsheet on the 1st of every month. I am fairly new to HeidiSQL, so wanted to check if this is even possible?

Would be grateful for any advice on how this can be set-up.

Thanks

Misha v.3's profile image Misha v.3 posted 5 years ago Permalink

Run your query in heidi, then RMB (Right Mouse Button) over result grid and click 'Export grid rows'. Check 'Copy to clipboard', 'Excel CSV' & Complete row selection and hit OK. Now you can paste the copied data into your Excel. Alternatively, you can skip clipboard stuff save data directly to .csv file that will be opened in Excel just fine.

ramanm's profile image ramanm posted 5 years ago Permalink

Hi,

Thanks for the response.

I am looking to get all of this done automatically every morning on the 1st of the month. I need to remove the manual work.

kalvaro's profile image kalvaro posted 5 years ago Permalink

HeidiSQL is a GUI tool; it addresses an entirely different use case. The whole point of graphical interfaces is precisely making manual work easier.

Misha v.3's profile image Misha v.3 posted 5 years ago Permalink

Yup, Heidi is for different purpose.

You can use mysql cli to execute query and save results into csv file: https://dev.mysql.com/doc/refman/5.7/en/select-into.html

Then put it in cron/scheduler.

ramanm's profile image ramanm posted 5 years ago Permalink

Thanks guys, will do some research on cron/scheduler

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.