Re: query failed , don't know why

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Jeff MacDonald <jeff(at)pgsql(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: query failed , don't know why
Date: 2000-06-24 03:31:20
Message-ID: 39542B87.EEC820FD@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

> UPDATE members m,payments p SET m.status = 2
> WHERE p.paydate > 'now'::datetime - '1 month'::timespan
> and p.productid = 'xxxxxxx' and m.gid = p.gid

Try

UPDATE members set status = 2
FROM payments p
WHERE p.paydate > timestamp 'now' - interval '1 month'
AND p.productid = 'xxxxxxx' and members.gid = p.gid;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-06-24 04:23:13 Re: 64-bit sequences
Previous Message Thomas Lockhart 2000-06-24 03:22:31 Re: 64-bit sequences

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-06-24 04:37:09 Re: [HACKERS] query failed , don't know why
Previous Message Brian P. Mann 2000-06-23 22:04:31 Re: query failed , don't know why