Re: Select question..... is there a way to do this?

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Select question..... is there a way to do this?
Date: 2007-08-04 06:08:08
Message-ID: 1186207688.409763.261840@k79g2000hse.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Aug 3, 11:17 pm, k(dot)(dot)(dot)(at)denninger(dot)net (Karl Denninger) wrote:
> Ideas?

SELECT item.user, item.subject, item.number
FROM item, seen
WHERE item.user = seen.user
AND item.number = seen.number
AND item.changed > seen.lastviewed
UNION
SELECT item.user, item.subject, item.number
FROM item, seen
WHERE item.user = seen.user
AND seen.number IS NULL
AND item.changed > seen.lastviewed;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message cluster 2007-08-04 11:08:13 Safe usage of tsearch2: to_tsquery('<user input>')
Previous Message hanasaki 2007-08-04 04:42:35 HA, failover and load balancing / howto?