Re: [GENERAL] Merge data from two databases

2010-05-28 Thread Goran Hasse
Actually you have to write a program to insert one database into another. This is so the program can check for concistancy and maybe recect records or datasets that are inconsistent. GH 2010/5/28 Jamie Lawrence-Jenner > Hi There > > > > We have a stats databases which has been dumped out a few

Re: [GENERAL] How to fetch values at regular hours?

2010-05-25 Thread Goran Hasse
05-23 16:00:00 | 2010-05-23 16:53:17.989268 |30 CNT-3 | 2010-05-23 17:00:00 | 2010-05-23 17:03:18.1447 |33 CNT-3 | 2010-05-23 17:00:00 | 2010-05-23 17:13:18.199568 |35 (10 rader) Seems promising... But then I would like to select only the last from date_trunc... Hm... GH 2010/5/2

[GENERAL] How to fetch values at regular hours?

2010-05-25 Thread Goran Hasse
Hello all! I am logging my electricity meeter every five minute! But the problem is that I would like to get values *just before* every hour - like select * from counter_log_view where name='CNT-3' and timestamp < '2010-05-23 22:00:00' order by timestamp desc limit 1; name | timestamp