人员表的启动中心结果集
我正在使用 Maximo 资产管理系统(版本 7.1.1.6)。我试图在开始中心显示一个结果集,其中包含特定人员的“请勿致电”列表。但是,当对结果集使用查询(保存在“人员”部分中的查询,其中包含相应的“where”子句,例如“department='ABC'”)时,我无法选择电话号码或电子邮件地址作为要显示的列。我相信这是因为人员表中的“主要电话”和“主要电子邮件”字段并不真正存在。它们是虚拟字段,在“人员”应用程序中连接到“电话”和“电子邮件”表,并连接到 personid 列。如果我在数据库中运行以下查询,我会得到我想要的结果集:
select * from dbo.person as p
left outer join dbo.phone as ph on p.personid=ph.personid and ph.isprimary=1
left outer join dbo.email as e on p.personid=e.personid and e.isprimary=1
不幸的是,对于结果集,您无权访问“FROM”子句,只能编辑“WHERE”子句。
除了在人员表中添加 2 个新列作为主要电话和主要电子邮件之外,任何人都知道如何解决此问题?我不想这样做,但如果必须的话我可以这样做。
I am working with the Maximo Asset Management System (version 7.1.1.6). I am trying to display a result set on the start center that contains a Do Not Call list of specific people. However, when using a query for the result set (a query that was saved in the People section that contains the appropriate "where" clause such as "department='ABC'"), I cannot select the phone number or the email address as a column to display. I believe this is due to the fact that the "Primary Phone" and "Primary Email" fields in the person table are not really there. They are virtual fields that are connected in the People application to the Phone and Email tables and joined on the personid column. If I run the following query in the database, I get the result set that I want:
select * from dbo.person as p
left outer join dbo.phone as ph on p.personid=ph.personid and ph.isprimary=1
left outer join dbo.email as e on p.personid=e.personid and e.isprimary=1
Unfortunately for the result sets, you don't have access to the "FROM" clause you can only edit the "WHERE" clause.
Anyone have any idea how to solve this other than adding 2 new columns to the person table for primary phone and primary email? I don't want to HAVE to do it, but I can if I must.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 where 子句来说怎么样?
我还可以想到在数据库配置应用程序中创建关系的解决方案,但上面的查询更直接。
How about this for a where clause
I can also think of a solution creating a relationships in the database configuration application, but the above query is more straight forward.