On Thu, Jan 11, 2007 at 20:07:29 +0100,
Marcus Engene <[EMAIL PROTECTED]> wrote:
> Hi list,
>
> I'd like to generate the latest year dynamically with generate_series.
> This select works day wise:
>
> This works but looks grotesque:
>
> select distinct date_trunc ('month', now()::date + s.a)::
Tom Lane skrev:
Marcus Engene <[EMAIL PROTECTED]> writes:
I tried this but it didn't work:
select date_trunc ('month', now())::date + interval s.a || ' months'
from generate_series(0, 11) as s(a)
People keep trying that :-(. The "typename 'foo'" syntax is for a
*literal constant* only. In
Marcus Engene <[EMAIL PROTECTED]> writes:
> I tried this but it didn't work:
> select date_trunc ('month', now())::date + interval s.a || ' months'
> from generate_series(0, 11) as s(a)
People keep trying that :-(. The "typename 'foo'" syntax is for a
*literal constant* only. Instead use multip
Hi list,
I'd like to generate the latest year dynamically with generate_series.
This select works day wise:
select date_trunc ('month', now())::date + s.a
from generate_series(0, 11) as s(a)
I tried this but it didn't work:
select date_trunc ('month', now())::date + interval s.a || ' months'
f