am Sun, dem 26.08.2007, um 21:49:29 -0700 mailte Chirag Patel folgendes:
> The following command works great,
> SELECT AVG(column) FROM table WHERE timestamp > 2007-08-23;
>
> But when I try it with finer resolution (hour, minutes, seconds) like this, I
> get a syntax error
> SELECT AVG(heartrate) FROM heartrates WHERE timestamp > 2007-08-23 19:48:09;
Can you show us the error?
>
> Do I need to convert from string format to total number of seconds? Any ideas
> on how to get this work?
Try: "WHERE timestamp > '2007-08-23 19:48:09'::timestamp ";
Btw.: bad idea to title a column 'timestamp', because this is a
datatype-identifier - but it works.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net