Re: [SQL] How to Select a Tupl by Nearest Date

2008-07-22 Thread Christian Kindler
ill be faster like a single function call (just the max function needs only 141ms) ... Thanks for your Help Christian Original-Nachricht > Datum: Tue, 22 Jul 2008 11:06:07 +0200 > Von: "A. Kretschmer" <[EMAIL PROTECTED]> > An: pgsql-sql@postgresql

Re: [SQL] How to Select a Tupl by Nearest Date

2008-07-22 Thread A. Kretschmer
am Tue, dem 22.07.2008, um 10:42:56 +0200 mailte Christian Kindler folgendes: > Hello > > Assume I have a table like > create table foo ( > id serial, > date foodate, > primary key(id) > ); > > with 2 tupls > insert into foo(foodate) values('2008-07-07'); --id = 1 > insert into foo(foodate