Solved

Compile Maria database very 30 days interval

Posted on 2015-01-29
1
131 Views
Last Modified: 2015-02-13
Hi , Good day,

I am getting raw data into my database (table) every second and filling up my database - no issue on that part. I want to compile my data every 30 days interval automatically example date from 15/jan ~ 14/feb and so on. Is that possible in Maria db
0
Comment
Question by:TITO2009
1 Comment
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 40578380
Yes, this is possible. You may use ADDDATE or DATE_ADD function to calculate the date + 30 days.

More info: https://mariadb.com/kb/en/mariadb/date-and-time-functions/

To execute the compilation every 30 days just CREATE EVENT: https://mariadb.com/kb/en/mariadb/events/

More info: https://mariadb.com/kb/en/mariadb/create-event/

Your compilation will be more complex than one simple statement so I would recommend to create and call Stored Procedure.

More info: https://mariadb.com/kb/en/mariadb/stored-procedures/
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question