How can I retrieve data from two SharePoint List using Join CamlQuery ?
|
|
|
hope these links will help you out, http://yogeshlotlikar.wordpress.com/2012/02/17/caml-query-joins/ http://blogs.msdn.com/b/kaevans/archive/2012/01/20/sharepoint-2010-caml-list-joins.aspx |
|||
|
|
|
You should try using SPSiteDataQuery for Join Operation.. http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx |
|||
|
|
|
http://cawl4sharepoint.com/cawl4sharepoint/cawl_querybuilder/ cawl_QueryBuilder cawl = new cawl_QueryBuilder(); cawl.Select("Users_Title"); cawl.Select("Users_Age"); cawl.Select("Users_Sex"); cawl.Select("CarBrand"); cawl.Join("UsersList";"OwnerColumn"); cawl.Get('UserCarsList'); StringBuilder Result = new StringBuilder(); foreach (SPListItem item in cawl.ListItemCollection()) { Result.Append(item["Users_Title"].ToString() + item["Users_Age"].ToString() + item["Users_Sex"].ToString() + item["CarBrand"].ToString()); } Label1.Text = Result .ToString(); |
|||
|
|
