pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
subquery involving 'now'
3+ messages / 3 participants
[nested] [flat]

* subquery involving 'now'
@ 2002-03-07 14:08 jmycr@cs.com
  2002-03-13 16:04 ` Re: subquery involving 'now' Stephan Szabo <sszabo@megazone23.bigpanda.com>
  2002-03-13 16:58 ` Re: subquery involving 'now' Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 2 replies; 3+ messages in thread

From: jmycr@cs.com @ 2002-03-07 14:08 UTC (permalink / raw)
  To: pgsql-sql

SELECT a.backup_id, a.archive_id, a.file_name, a.file_size, b.something
FROM archive a, burp b
WHERE a.aname = b.aname and a.backup_date < 'now'::datetime - '(select maxday_savefile from service) days'::timespan;

this does not work, any suggestions
jnc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: subquery involving 'now'
  2002-03-07 14:08 subquery involving 'now' jmycr@cs.com
@ 2002-03-13 16:04 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2002-03-13 16:04 UTC (permalink / raw)
  To: jmycr@cs.com; +Cc: pgsql-sql


On Thu, 7 Mar 2002 jmycr@cs.com wrote:

> SELECT a.backup_id, a.archive_id, a.file_name, a.file_size, b.something
> FROM archive a, burp b
> WHERE a.aname = b.aname and a.backup_date < 'now'::datetime - '(select maxday_savefile from service) days'::timespan;
>
> this does not work, any suggestions

Maybe
- ((select maxday_savefile from service) || ' days')::timespan




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: subquery involving 'now'
  2002-03-07 14:08 subquery involving 'now' jmycr@cs.com
@ 2002-03-13 16:58 ` Gaetano Mendola <mendola@bigfoot.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Gaetano Mendola @ 2002-03-13 16:58 UTC (permalink / raw)
  To: jmycr@cs.com; pgsql-sql

<jmycr@cs.com> wrote:
> SELECT a.backup_id, a.archive_id, a.file_name, a.file_size, b.something
> FROM archive a, burp b
> WHERE a.aname = b.aname and a.backup_date < 'now'::datetime - '(select
maxday_savefile from service) days'::timespan;

Try:

using now() not 'now'::datetime.


Ciao.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-03-13 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-07 14:08 subquery involving 'now' jmycr@cs.com
2002-03-13 16:04 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-03-13 16:58 ` Gaetano Mendola <mendola@bigfoot.com>

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