Page 1
Page 1
Started By
Message

Need help automating reports in MySQL

Posted on 3/1/23 at 12:39 am
Posted by jlu03
San Diego
Member since Jul 2012
3341 posts
Posted on 3/1/23 at 12:39 am
Every month I have to pull a large amount of data but it’s broken up by model numbers. Instead of exporting each file one at a time, is there a more efficient method?? Ideally, I’d like to set the schedule for the 25th of every month to automatically pull every model number in different excel spreadsheets.
This post was edited on 3/1/23 at 12:53 am
Posted by GrammarKnotsi
Member since Feb 2013
9840 posts
Posted on 3/1/23 at 6:45 am to
did you ask chatgpt ?
Posted by WhiskeyThrottle
Weatherford Tx
Member since Nov 2017
6443 posts
Posted on 3/1/23 at 7:40 am to
Can you explain the process a little more clearly? Do you execute a query or multiple queries on the 25th of every month, then drop the results into a spreadsheet and that is what you're trying to automate?

What do you mean by "exporting each file one at a time"?

Off the top of my head you need a C# application calling a series of stored procs and save the results to a spreadsheet. I'd use the dapper library for database calls. It's pretty easy to use. You could then set the application up on windows task scheduler to run on the 25th of every month.
Posted by jlu03
San Diego
Member since Jul 2012
3341 posts
Posted on 3/4/23 at 4:53 pm to
quote:

did you ask chatgpt ?


I did and the GPT gods said it was possible but couldn’t understand how to complete the process
Posted by jlu03
San Diego
Member since Jul 2012
3341 posts
Posted on 3/4/23 at 4:56 pm to
quote:

WhiskeyThrottle


Executing multiple queries each month then save the results from each query into an excel spreadsheet. The data from each query executed will have its own spreadsheet. Hope that helps
Posted by omegaman66
greenwell springs
Member since Oct 2007
24827 posts
Posted on 3/5/23 at 12:04 am to
ChatGPT is great. But it isn't always right. If I tell it to generate a title for an article that is between 40 and 65 characters long, it doesn't listen and gives me whatever it wants. It has also generated a bunch of scrips that I had to modify to get them to work.
Posted by Hulkklogan
Baton Rouge, LA
Member since Oct 2010
43471 posts
Posted on 3/5/23 at 12:19 pm to
Sounds like a job for python. Queries DB for data by model, stores the data into Pandas DFs, easily exportable to csv from there.
Posted by jlu03
San Diego
Member since Jul 2012
3341 posts
Posted on 3/5/23 at 2:30 pm to
Can you explain that to me like I don’t understand English
Posted by Hulkklogan
Baton Rouge, LA
Member since Oct 2010
43471 posts
Posted on 3/5/23 at 8:40 pm to
Python is a programming language commonly used for scripting and automating tasks just like what you're describing.

In this case, you can use Python (if you feel up to learning it) to query the MySQL DB for the data you need. Python has a library called "pandas" that can store that data in "dataframes" (df), which are easily exportable to CSV.


That said, I don't know if there an easier solution than learning to code
Posted by LetsgoGamecocks
Member since Sep 2014
2916 posts
Posted on 3/7/23 at 9:47 am to
PowerBI can easily report on SQL data
first pageprev pagePage 1 of 1Next pagelast page
refresh

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on X, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookXInstagram