8
Shouts

LINQ Group By with NULL database values

published 689 days, 6 hours, 56 minutes ago posted by http://vistadb.myopenid.com/http://vistadb.myopenid.com/ 690 days, 5 hours, 46 minutes ago
Tuesday, July 06, 2010 2:39:43 PM GMT Monday, July 05, 2010 3:50:11 PM GMT

LINQ is fantastic for the ability to write queries that express intent much more clearly than the same SQL, or structured code.  One problem that I have run into though is handling NULL database values that are part of a group by statement.  Grouping by ProductSKU Grouping in LINQ allows you to return sets of data from a collection for a given key value.  The group by clause is what the key ends up being in the result set.  Lets take a grouping of the Products by the SKU.from p in Products group p ...

category: SQL | clicked: 7 | | source: infinitecodex.com | show counter code
tags: VistaDB, SQL, Group by, Linq