[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Compare two rows in one table ?
From:       Maxime van Noppen <maxime () altribe ! org>
Date:       2009-09-23 14:33:25
Message-ID: 4ABA31B5.9070805 () altribe ! org
[Download RAW message or body]

Tuomas Ruohonen wrote:
> Compare two rows in table, when result changes more than 2 query shows 
> only those rows. In this case query ignores 25,25,25,24,23 and shows 
> only 26,24 and 21. There should be always one number only if the number 
> is same, like 24 and 24, shows only one 24.
> Is this even possible ? I hope you can understand what i mean in this 
> case...

I believe this should be be more appropriate in the postgresql user list.

Btw, the answer to your question is quite easy. Look at the 'DISTINCT' 
keyword for SELECT queries :

http://www.postgresql.org/docs/8.4/interactive/sql-select.html

-- 
Maxime
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic