Skip site navigation (1) Skip section navigation (2)

Temporal query question

From: "Stefano Bonnin" <stefano(dot)bonnin(at)comai(dot)to>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Temporal query question
Date: 2004-11-30 10:30:16
Message-ID: 006001c4d6c7$955fdc60$0501a8c0@comai04 (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Hi all,

I have a "simple" question about the following temporal query with "interval" operator:

can I define a query of this type?

select myfield,numeric_field from mytable where temporal_attribute < temporal_attribute - interval numeric_field || ' days'

obviously this syntax is wrong.
In other words, is there a way to define a query with a interval operator with variable argument?


pgsql-general by date

Next:From: JoolzDate: 2004-11-30 10:31:18
Subject: Re: change natural column order
Previous:From: deepthiDate: 2004-11-30 10:29:15
Subject: Maximum limit on int in plpgsql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group