SPSiteDataQuery is the only data access approah that can Aggregating list data across multiple sites within a site collection
The following example is a Web Part that queries all lists that were created with the Contacts list template anywhere in the site collection, retrieves the first and last names of every contact, and displays that information in a GridView control.
use web.GetSiteData(query) to get the result

This one use BaseType(), instead of ServerTemplate ()
More info on Types: http://www.pointsharepoint.com/2008/08/spsitedataquery-crosslistqueryinfo.html

Another similar class is CrossListQueryInfo – benefits – web part can take advantage of caching

LINQ Query with JOIN

Group Join = Left Out Join

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: