访问查询将 Sharepoint 名称转换为数字
知道为什么 SharePoint 在附加到新表时将人员姓名(分配给每条记录)从 SharePoint 列表转换为数字吗?
代码如下所示:
INSERT INTO Table1
( ID, [Party Name], Status, [Date Started], [Date Finalized], [Assigned to] )
SELECT
[SharepointList].N_PERS
, [SharepointList].Name
, [SharepointList].Status
, [SharepointList].[Date Started]
, [SharepointList].[Date Finalized]
, [SharepointList].[Assigned to]
FROM
[SharepointList];
Any idea why SharePoint converts the names of people (assigned to each record) from a SharePoint list to numbers when appended to a new table?
Code looks like this:
INSERT INTO Table1
( ID, [Party Name], Status, [Date Started], [Date Finalized], [Assigned to] )
SELECT
[SharepointList].N_PERS
, [SharepointList].Name
, [SharepointList].Status
, [SharepointList].[Date Started]
, [SharepointList].[Date Finalized]
, [SharepointList].[Assigned to]
FROM
[SharepointList];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SharePoint 具有与访问“相同”的功能 - 它可以创建查找字段 - 而且它们通常会造成更多的痛苦,然后再解决。因此,在访问中,如果您在表级别定义查找,则名称(来自其他表的文本显示)。但如果您运行报告并进行分组,它将根据保存的基础“id”进行分组。
所以,实际上,在幕后,确实有一个相关的表。
您必须重写查询,并在查询构建器中将其放入用户使用的 OTHER 表中。因此,虽然一张表“看起来”像一张表,但它实际上是一张相关表。
如果您想要实际的文本名称,则必须构建一个包含其他“用户”表的查询。
尝试加载访问查询生成器,其他列可能会显示为“文本”。
SharePoint has that "same" ability as access - it can create lookup fields - and they often cause more pain then they fix. So, in access, if you define a lookup at the table level, then the name (text from the other table shows). but if you run a report and group by, it groups by on the underlying "id" that is saved.
So, in effect, behind the scene, there REALLY is a related table.
You have to re-write the query, and in the query builder drop in the OTHER table being used for user(s). So, while the one table "looks" like one table, it is in fact a related table.
If you want the actual text name, you have to build a query with the other "user" table joined in.
Try loading up the access query builder, the other columns as "text" may well be displayed.