Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 2010 我如何加入2 sharepoint 2010列表_Sharepoint 2010 - Fatal编程技术网

Sharepoint 2010 我如何加入2 sharepoint 2010列表

Sharepoint 2010 我如何加入2 sharepoint 2010列表,sharepoint-2010,Sharepoint 2010,当使用SP 2007并需要执行联接时,我只需将表写入sql表,然后使用sql联接表。 我真正需要做的很简单。 我有一个主列表和另一个用户插入记录的列表,比如子列表。 当用户打开主列表并单击某个项目时,我会在子列表中插入一条记录,其中包括他们的用户名 我只想向用户显示(基于登录名)他们没有阅读的项目以及哪些项目。 在sql中,我可以做一些类似于 Select * from master where not in(select from child where username ='blalal'

当使用SP 2007并需要执行联接时,我只需将表写入sql表,然后使用sql联接表。 我真正需要做的很简单。 我有一个主列表和另一个用户插入记录的列表,比如子列表。 当用户打开主列表并单击某个项目时,我会在子列表中插入一条记录,其中包括他们的用户名 我只想向用户显示(基于登录名)他们没有阅读的项目以及哪些项目。 在sql中,我可以做一些类似于

 Select * from master where not in(select from child where username ='blalal')
任何想法。不确定是在客户端还是在对象模型中进行。 当然CAMl没有连接


提前感谢

只要两个列表通过查找字段关联,您就可以在CAML查询中进行连接


或者您可以使用Bendsoft的Camelot.NET连接器连接任何字段。它支持典型的CRUD命令,包括左联接、内联接和并集。

检查此方法非常容易联接任意多个列表:

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();