pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: john@flowlabs.com
Cc: pgsql-sql@postgresql.org
Subject: Re: problems with date and interval queries.
Date: Mon, 10 Feb 2003 10:14:15 -0800 (PST)
Message-ID: <20030210101150.P99596-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <36167.24.136.118.31.1044900318.squirrel@zero.voxel.net>


On Mon, 10 Feb 2003 john@flowlabs.com wrote:

> I am having problems adding an interval to a date in a select statement
> where the interval is specified as a selected column. Is this possible?
> Below is an example of the query that I'm executing. The query gives and
> error at the num_min column in the outer query. It works fine if that is
> replaced with the text '90 minutes'. Thank you in advance for all help
> provided.

interval <stuff> is the form for an interval literal.  If the column is
already an interval, you probably don't need it at all.  If you need to
cast it you should do a cast CAST (num_min AS INTERVAL)




view thread (4+ messages)  latest in thread

Message-ID: <20030210101150.P99596-100000@megazone23.bigpanda.com>
Permalink:  ../20030210101150.P99596-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030210101150.P99596-100000@megazone23.bigpanda.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: sszabo@megazone23.bigpanda.com, john@flowlabs.com
  Subject: Re: problems with date and interval queries.
  In-Reply-To: <20030210101150.P99596-100000@megazone23.bigpanda.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