Re: [SQL] Problem with query on history table

2006-03-01 Thread Andreas Joseph Krogh
On Wednesday 01 March 2006 23:19, Jim C. Nasby wrote: > Probably the easiest way is to switch to using table partitioning and > switch to using start_timestamp and end_timestamp, so that when you > modify a row you update the old one setting end_timestamp to now() and > insert the new row (all with

Re: [SQL] Problem with query on history table

2006-03-01 Thread Jim C. Nasby
Probably the easiest way is to switch to using table partitioning and switch to using start_timestamp and end_timestamp, so that when you modify a row you update the old one setting end_timestamp to now() and insert the new row (all within one transaction). There are other ways to do it, but they'

[SQL] Problem with query on history table

2006-02-26 Thread Andreas Joseph Krogh
Hi all! I don't know if there's a standard solution to the kind of problem I'm trying to solve, but I will appreciate your thougts(and maybe solution:) on this problem of mine: I have 2 tables: hist and curr which hold numbers for "history-data" and "current-data" respectivly. Here is a simpli