Expert Answer Center > Experts On Demand > View Answer
EMAIL THIS
Experts on Demand
  EXPERTS ON DEMAND HOME     POSE A QUESTION     VIEW ANSWERS     BROWSE BY TOPIC        RSS FEEDS  
I have two tables, person and caserl. Person contains person IDs, and caserl has person IDs and end date. I need to select a row from person where all of the end dates on caserl for that person ID are < '9999-12-31'. QUESTION POSED ON: 26 JUL 2005
QUESTION ANSWERED BY: Rudy Limeback
select Person.personid
  from Person
inner
  join caserl
    on Person.personid = caserl.personid
group
    by Person.personid
having count(*)
     = sum(case when caserl.enddate < '9999-12-31'
                then 1 else 0 end)
HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts