Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing records from a SQL query
Message
 
 
To
21/01/2010 17:04:39
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01445297
Message ID:
01445348
Views:
17
>>I just re-read your original question again. You don't need to group by ChildPK as in your example (unless it was a complete mock) you seemed to take the first record per Parent Key, not by Parent and ChildKey combined.
>
>When I have more than one child record combinations, I have to take the one with the highest value in the child field. So far, this would work as we would only have two records in a combination, at most, and the one with the highest value would work.

You don't want to GROUP by ChildKey.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform