X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2BCAF9DD5E4 for ; Tue, 6 Dec 2005 12:50:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42858-03 for ; Tue, 6 Dec 2005 12:50:34 -0400 (AST) X-Greylist: delayed 03:00:55.212051 by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id 9D2A49DCCF1 for ; Tue, 6 Dec 2005 12:50:33 -0400 (AST) Received: from spinet.pl (dagger.spinet.pl [195.205.122.6]) by svr2.postgresql.org (Postfix) with ESMTP id 4BCFDF0B5D for ; Tue, 6 Dec 2005 13:49:44 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by spinet.pl (Postfix) with ESMTP id 55DDC13E35 for ; Tue, 6 Dec 2005 14:59:09 +0100 (CET) Received: from spinet.pl ([127.0.0.1]) by localhost (dagger [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 31028-07 for ; Tue, 6 Dec 2005 14:59:08 +0100 (CET) Received: by spinet.pl (Postfix, from userid 65534) id 3F5B314071; Tue, 6 Dec 2005 14:59:08 +0100 (CET) Received: from hackstation (abv130.internetdsl.tpnet.pl [83.16.47.130]) by spinet.pl (Postfix) with ESMTP id ECA9713E35 for ; Tue, 6 Dec 2005 14:59:06 +0100 (CET) From: "Magdalena Komorowska" To: Subject: Date Interval Date: Tue, 6 Dec 2005 14:49:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 Thread-Index: AcX6a+M43xtpay2YQYWYqptgn1UzDQ== Message-Id: <20051206135906.ECA9713E35@spinet.pl> X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at spinet.pl X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.332 required=5 tests=[RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.332 X-Spam-Level: * X-Archive-Number: 200512/46 X-Sequence-Number: 23588 Hi, I hale a problem with counting interwal and I can't find what to do with this. I have two fields in the table: Column | Type | Modifiers -----------------+---------+----------- date_in | date | interwal_months | numeric | -----------------+---------+----------- Query SELECT date_in + INTERVAL '3 MONTH' FROM any_table works fine of course. However, how to do something like that? SELECT date_in + INTERVAL ' interwal_months MONTH' FROM any_table I hope I'm just blind.. ;-) Thanks for any help. MK