pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vivek Khera <khera@kcilink.com>
To: pgsql-sql@postgresql.org
Subject: Re: Adding an INTERVAL to a variable
Date: 07 Aug 2001 11:00:23 -0400
Message-ID: <x73d737w54.fsf@onceler.kciLink.com> (raw)
References: <9kg88k$1j30$1@news.tht.net>

>>>>> "GC" == Graham Coates <graham@mindvision.com.au> writes:

GC> SELECT Invoices.InvoiceDate + INTERVAL '41 Days'
GC> works fine
GC> but when trying to substitute the number of days with a value form a field
GC> e.g.

GC> SELECT Invoices.InvoiceDate + INTERVAL Acct.AverageDaysToPay 'Days'

try 

 SELECT Invoices.InvoiceDate + Acct.AverageDaysToPay::interval



-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



view thread (3+ messages)  latest in thread

Message-ID: <x73d737w54.fsf@onceler.kciLink.com>
Permalink:  ../x73d737w54.fsf@onceler.kciLink.com/
Also on:    postgresql.org/message-id/x73d737w54.fsf@onceler.kciLink.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: khera@kcilink.com
  Subject: Re: Adding an INTERVAL to a variable
  In-Reply-To: <x73d737w54.fsf@onceler.kciLink.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox