am  Mon, dem 20.10.2008, um 15:24:38 +0200 mailte Patrick Scharrenberg 
folgendes:
> Hi!
> Is there a simple way to generate sequences of dates like the following?
>       "2008-07-03 00:00:00"
>       "2008-07-04 00:00:00"
>       "2008-07-05 00:00:00"
>       "2008-07-06 00:00:00"
> 

Sure:

test=# select '2008-07-03'::date + s * '1day'::interval from
generate_Series(1,10) s;
      ?column?
---------------------
 2008-07-04 00:00:00
 2008-07-05 00:00:00
 2008-07-06 00:00:00
 2008-07-07 00:00:00
 2008-07-08 00:00:00
 2008-07-09 00:00:00
 2008-07-10 00:00:00
 2008-07-11 00:00:00
 2008-07-12 00:00:00
 2008-07-13 00:00:00
(10 rows)


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to