Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One to many relationship INNER JOIN condition
Message
 
 
To
14/02/2011 09:42:56
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01500073
Message ID:
01500093
Views:
45
>>Try
>>
>>SELECT *
>>  FROM master m
>>  WHERE EXISTS ( SELECT 1 FROM slave s 
>>             WHERE s.fk = m.pk HAVING COUNT(*) = SUM( CASE WHEN <condition> THEN 1 ELSE 0 END ))
>>
>
>Thanks, I tried that but I still have the same results.

Post the input and desired output, only when you will be able to get a good solution.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform