Hi all!
I was trying to code something similar and need some advice on the best approach for this.
1) I have a fixed number of tables which share the exact same structure but from different sites. The structure is say:
branch1 to branch7 (each table is a branch).
SID (primary key), Employee_ID, date-hour (ddMMyyyy-hh-mm), Employee_Dpt, Employee_Function, Employee_affectation, Employee_type
This data comes from csv files named after the tables, which should be periodically (or on demand) loaded into a database using loadcsv.
2) What I am trying to do is get this data under this format:
Tabhost1 populated with
Tab1 = day1
Number of employees of each type, by day
empltype\date day1 | day2 | day3 | day4 |...dayN
type1 |74 | 44 | etc |
type2 |22 | 32 |
type3 |44 | 29 |
...
type7 |54 | 33 |
Tab2 = branch2 (same structure)
.TabN+1 = total for all branches
(the number of days and the start date are entered by the user using 1 datedialog and an input dialog (ddial and inpdial1)
1 tab = 1 day
The data files shouldn't exceed a few hundred lines a day, to at most 10 000.
What would be the best way to do this, and avoid memory issues? All this is to be executed on a tablet with 512 MB to 1Gb RAM which doesn't seem too much, so I'am wondering if using sql queries to do the "math" and populate the cells should be the best idea here or maybe something else I am not aware of at this time.
Hope this is clear, I'm not too sure about my english, sorry...
Best regards.