Re: help with select statement

From: wibni <Boettger.Andreas_at_gmail.com>
Date: Sun, 18 Jan 2009 22:28:13 -0800 (PST)
Message-ID: <0b408979-6da6-4350-bfa6-50dc99b2d188_at_r41g2000prr.googlegroups.com>



Brilliant! It works! Thanks Gerard!

I also got it working in an analytic function but Gerard's statement is actually quicker then my function. I always thought a function is the fastest way.
Never mind! Thanks again all!

select distinct name, swcode
from
(select name, swcode,
count(case when relkeyword.swcode = 173 then 1 end) over (partition by cscontact.name) as cnt173
from cscontact,relkeyword
where cscontact.pubindex = relkeyword.relpubindex(+)) where cnt173 = 0
order by name Received on Mon Jan 19 2009 - 00:28:13 CST

Original text of this message