Hi,
Does SQL Server 2005 support ANY or EVERY with HAVING?
Suppose I have two tables Training(TrainingID, TrainingCloseDate) and TrainingDetail(TrainingDetailID,TrainingID,LKClassCode,CompletionDate). For one TrainingID, there can be multiple values in TrainingDetail with different LKClassCode. I need to find all the TrainingIDs which have atleast one TrainingDetailID with CompletionDate between 1/1/2009 and 1/1/2010.
When I tried with HAVING ANY, I got an error "Incorrect syntax near the keyword 'ANY'." if it does not support, could you please suggest an alternative?
What if I need to find all the TrainingIDs which have 'atleast one TrainingDetailID with CompletionDate between 1/1/2009 and 1/1/2010 or the TrainingCloseDate = '5/5/2009' '?
Thanks Lijo