Re: Dynamic Query for System functions - now() - Mailing list pgsql-sql

From Gaetano Mendola
Subject Re: Dynamic Query for System functions - now()
Date
Msg-id 3FAFE331.2040308@bigfoot.com
Whole thread Raw
In response to Dynamic Query for System functions - now()  ("Kumar" <sgnerd@yahoo.com.sg>)
List pgsql-sql
Kumar wrote:

> Dear Friends,
>  
> I am using PostgreSQL 7.3.4 Server on RH Linux 7.2. I am trying to 
> generate a dynamic query to fetch the next month interval.
>  
> select now()+ interval'1 month';  -- This is working fine.
>  
> I wanna dynamically assign the interval number. i,e --> select now()+ 
> interval'n month';

What about:

select now() + n * '1 month'::intervall;


Regards
Gaetano Mendola



pgsql-sql by date:

Previous
From: Rod Taylor
Date:
Subject: Re: transaction processing after error in statement
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: transaction processing after error in statement