A. Kretschmer schreef:
In response to Erwin Moller :
Hi,
Is it possible to create a range of dates or numbers inside a query
without wrining in procedural language?
I am looking for something that creates some kind of 'temp table' inside
a query.
eg:
generate_Series():
test=# select * from generate_Series(1,5);
generate_series
-----------------
1
2
3
4
5
(5 rows)
test=*# select current_date + s * '1day'::interval from
generate_Series(1,5)s;
?column?
---------------------
2008-12-20 00:00:00
2008-12-21 00:00:00
2008-12-22 00:00:00
2008-12-23 00:00:00
2008-12-24 00:00:00
(5 rows)
Andreas
Wow, you ARE fast. :-)
Thanks a lot all, excactly what I was looking for!
Regards,
Erwin Moller
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general