Merge queries from different DBs
Posted: 05.09.2012, 14:12
Hello,
I log data into a sqlite DB. If the DB has a size of 5MB I start a new one. I do this for reasons for performance and data corruption reasons.
Now I do queries on the DB, like give me the data from time x to time y.
When in this timespan there Database has changed, I have to do the queries on several dbs and merge the data afterwards.
My question: Is there an easy way to achive this with zeos?
The several queries just have to be appended into one Dataset. Only the last record of the first query and the first record of the second query need to be merged.
I tried things like having 2 TZQuery objects. query1 doing the query to the first db an query2 to the next. Then append all data from query2 to query1. The problem there is, that this should only be done in memory an not writtin the the real DB.
Any ideas for a good solution?
I log data into a sqlite DB. If the DB has a size of 5MB I start a new one. I do this for reasons for performance and data corruption reasons.
Now I do queries on the DB, like give me the data from time x to time y.
When in this timespan there Database has changed, I have to do the queries on several dbs and merge the data afterwards.
My question: Is there an easy way to achive this with zeos?
The several queries just have to be appended into one Dataset. Only the last record of the first query and the first record of the second query need to be merged.
I tried things like having 2 TZQuery objects. query1 doing the query to the first db an query2 to the next. Then append all data from query2 to query1. The problem there is, that this should only be done in memory an not writtin the the real DB.
Any ideas for a good solution?