Sorry for the fairly long post.
I'm having a big problem trying to update one table from another in
PostgreSQL 8.3.1.
I have a lookup table called termgroup:
# select * from termgroup;
termgroupname | mindays | maxdays
---+-+-
1-30 days | 1 | 30
31-59
On Fri, 22 Aug 2008, Steve Johnson wrote:
update certgroups
set termgroupname = tg.termgroupname
from certgroups c, termgroup tg
where (c.days = tg.mindays) and (c.days = tg.maxdays);
In recent PostgreSQL versions I believe this is properly written:
update certgroups c
set termgroupname =
Stephan Szabo [EMAIL PROTECTED] writes:
On Fri, 22 Aug 2008, Steve Johnson wrote:
update certgroups
set termgroupname = tg.termgroupname
from certgroups c, termgroup tg
where (c.days = tg.mindays) and (c.days = tg.maxdays);
In recent PostgreSQL versions I believe this is properly written: