I get 8 different Excel spreadsheets daily for the day's current information from the field. I use these to update my geodatabase tables. Here is a snapshot and the problem using Plumbing Equipment as an example:
1) I have the current Plumbing table in the sde that includes a field for the:
a) facility number that the appliance is located in, this field links to the facilities table with a relationship class
b) date of the report that the record was updated from, so if it came from yesterday's report it has yesterday's data.
2) The field's Excel spreadsheet is already formated with all of the same field headers and is compeltely compatible with the sde table. The equipment seldom changes (maybe weekly or monthly), but several key attributes do change such as the day the monthly inspection was done, or is the equipment was moved to a new facility.
3) The facilities and plumbing tables are linked by a relationship class. The sde database replicates everything to other servers where the field people access the data and maps.
I found that append and delete did almost everthing: Append the new table to the old table, delete identical records leaving me with a table of the new information and old information that is historical, and then deleting records older than 60 days to keep the files to a manageable size. The append/delete functions are very straight forward and cause no problem but weeding out records in a table by date seems to be a problem. I ended up with a model that looks like this:
1) MakeTableView with expression: FIELD > CURRENT_TIMESTAMP - 60
2) Append TableView as destination with Excel, which results in another TableView
3) Delete Identicals
4) Re-create Relationship Class since I need to convert the Table View back to a table and lose the relationships in the process.
Unfortunately it does not work. I think the first big problem is my query expression.
Any suggestions on making this more efficient and workable. Right now what I get is an empty table... URGH!
Thanks for your suggestions.
[please do not tell me to use other editting methods, what I got is what I have. also there are over 27000 records in the 8 tables so I am not going to manually edit]
1) I have the current Plumbing table in the sde that includes a field for the:
a) facility number that the appliance is located in, this field links to the facilities table with a relationship class
b) date of the report that the record was updated from, so if it came from yesterday's report it has yesterday's data.
2) The field's Excel spreadsheet is already formated with all of the same field headers and is compeltely compatible with the sde table. The equipment seldom changes (maybe weekly or monthly), but several key attributes do change such as the day the monthly inspection was done, or is the equipment was moved to a new facility.
3) The facilities and plumbing tables are linked by a relationship class. The sde database replicates everything to other servers where the field people access the data and maps.
I found that append and delete did almost everthing: Append the new table to the old table, delete identical records leaving me with a table of the new information and old information that is historical, and then deleting records older than 60 days to keep the files to a manageable size. The append/delete functions are very straight forward and cause no problem but weeding out records in a table by date seems to be a problem. I ended up with a model that looks like this:
1) MakeTableView with expression: FIELD > CURRENT_TIMESTAMP - 60
2) Append TableView as destination with Excel, which results in another TableView
3) Delete Identicals
4) Re-create Relationship Class since I need to convert the Table View back to a table and lose the relationships in the process.
Unfortunately it does not work. I think the first big problem is my query expression.
Any suggestions on making this more efficient and workable. Right now what I get is an empty table... URGH!
Thanks for your suggestions.
[please do not tell me to use other editting methods, what I got is what I have. also there are over 27000 records in the 8 tables so I am not going to manually edit]