Re: build a query

From: Gerard H. Pille <ghp_at_skynet.be>
Date: Wed, 17 Aug 2011 18:30:57 +0200
Message-ID: <4e4becad$0$5034$ba620e4c_at_news.skynet.be>



Michel Cadot wrote:
> "Paolo Fossati"<fossati_apoloNOSPAM_at_hotmail.com> a �crit dans le message de news: 4e4bd509$0$6840$5fc30a8_at_news.tiscali.it...
> | hi all,
> |
> | i'm trying (with no success ) to build an oracle query , db is oracle
> | 10, os windows 2008 64 bit
> |
> | in a table called "location" i have :
> |
> | REF location object_count
> |
> | 1000 a 22
> | 1000 b 22
> | 1001 a 57
> | 1001 b 55
> | .
> | .
> | .
> |
> | the same object (see the 1001 example ) is existing in 2 different
> | locations (a and b) but the number on objects are not the same (in one
> | place are 57, in the other 55)
> | As this number must be the same in all the locations for the same ref
> | (see the 1000 example), how can i spot with query all the refs thar are
> | not the same?
> |
> | thanks a lot fot your help
> | Paolo
>
> All are different or some are different?
>
> Regards
> Michel
>
>

select ref from (select distinct ref, object_count from location) group by ref having count(*) > 1 Received on Wed Aug 17 2011 - 11:30:57 CDT

Original text of this message