Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query Help....

Re: Simple Query Help....

From: Chuck <skilover_nospam_at_bluebottle.com>
Date: Thu, 12 Oct 2006 15:24:47 GMT
Message-ID: <37tXg.3407$Gp4.1494@trnddc08>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

amerar_at_iwc.net wrote:

> Fitz Guy,
> 
> Something I have to know, were you born with this rude, condesending
> and belligerent personality, or did it happen after you were sexually
> molested by your Father?
> 
> You should learn not to always put everyone else down.  Hence, there is
> always someone who knows more than you and there is always someone who
> knows less than you.
> 
> Go blow some sand up your ass and get off your high horse.
> 
> 
> 
> 
> fitzjarrell_at_cox.net wrote:

>> Comments embedded.
>> amerar_at_iwc.net wrote:
>>> Hey All,
>>>
>>> I just need a bit of help with this query. I want to select all of the
>>> duplicate synonym names in the database.
>> A simple group by query with a having clause works here:
>>
>> select synonym_name
>> from dba_synonyms
>> group by synonym_name
>> having count(*) > 1;
>>
>>> However, I want to list not
>>> just the synonym name, but also the owner of the synonym
>>> name............
>>>
>> So? You can't think far enough ahead to use the above query as a list
>> generator for an IN clause? Obviously not, given this is no different
>> from your usual posts
>>
>> select owner, synonym_name
>> from dba_synonyms
>> where synonym_name in ( select synonym_name
>> from dba_synonyms
>> group by synonym_name
>> having count(*) > 1)
>> order by synonym_name, owner;
>>
>> Reading the problem is half of the battle. Are the schools teaching
>> less while charging more, or is the clientelle to which they cater
>> increasingly lazy?
>>
>>
>>
>> David Fitzjarrell

>

There are a number of folks with similar attitudes. You need either thicker skin, or a bigger killfile. Fitzjarell's response was indeed rude, condescending, and uncalled for. I guess some folks never learned how to play nice with other kids and it carried over to adulthood. If he didn't like the question, he shouldn't have answered. Putting down others is only a deceptive means of self elevation.

You can use his query or do it with a dynamic view and a join.

SELECT a.owner, a.synonym_name
  FROM dba_synonyms a,

       (SELECT synonym_name
        FROM dba_synonyms
        GROUP BY synonym_name
        HAVING COUNT (*) > 1) b

 WHERE a.synonym_name = b.synonym_name

HTH -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iEYEARECAAYFAkUuXj4ACgkQzIf+rZpn0oTL5gCfaf3cMPQ5hnSwG2MQQXPOcxzt SpkAn1C9uRiae90yoU7pS5DAlda7SvjP
=5yaD
-----END PGP SIGNATURE----- Received on Thu Oct 12 2006 - 10:24:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US