正在从多个Sharepoint到SQL数据库中提取数据



我正在尝试将两个共享点列表中的数据提取到sql数据库中。一张表是科目列表,另一张表则是学生列表。(这是一个巨大的表格,但我只取了几个值供您参考。(到目前为止,我所做的只是提取状态为"正在进行"的主题。(因此,数据库中将只显示代码1001和1004。(现在,从第二个列表中,我想提取仅具有上述科目代码的学生的姓名。我该怎么做?表_主题表_研究

您可以使用它从SharePoint SQL server 中提取数据

use sharepoint
go
select * from [sharepoint].[YourSiteCollectionName].[YourListName]
where YourColumn = N'YourValue'

并且易于组合tsql查询来联接表:

SELECT 
[sharepoint].[YourSiteCollectionName].[subjects].code,
[sharepoint].[YourSiteCollectionName].[students].name,
FROM
[sharepoint].[YourSiteCollectionName].[students]
INNER JOIN 
[sharepoint].[YourSiteCollectionName].[students]
ON     [sharepoint].[YourSiteCollectionName].[students].subjectCode
=[sharepoint][YourSiteCollectionName].[subjects].code;

最新更新