日期:2014-05-18 浏览次数:20471 次
ALTER VIEW [dbo].[V_Idata] AS SELECT DoradoReport.中文姓,DoradoReport.中文名,DoradoReport.SAP工号,DoradoReport.员工原工号,SAP.employee_ID,notes.PersonID,notes.email, CTS.cts_ID,RMS_LOGONNAME,Domain_User.user_id FROM DoradoReport LEFT outer join SAP ON DoradoReport.SAP工号=SAP.employee_ID LEFT outer join notes ON DoradoReport.员工原工号=notes.PersonID or DoradoReport.SAP工号=notes.PersonID LEFT outer join CTS ON DoradoReport.员工原工号=CTS.cts_ID OR DoradoReport.SAP工号=CTS.cts_ID LEFT outer join RMS ON DoradoReport.员工原工号=RMS.RMS_ID OR DoradoReport.SAP工号=RMS.RMS_ID LEFT outer join Domain_User ON DoradoReport.员工原工号=Domain_User.user_id WHERE Domain_User.User_kind='Domain Users'
ALTER VIEW [dbo].[V_Idata] AS SELECT DoradoReport.中文姓,DoradoReport.中文名,DoradoReport.SAP工号,DoradoReport.员工原工号,SAP.employee_ID,notes.PersonID,notes.email, CTS.cts_ID,RMS_LOGONNAME,Domain_User.user_id FROM DoradoReport LEFT outer join SAP ON DoradoReport.SAP工号=SAP.employee_ID LEFT outer join notes ON DoradoReport.员工原工号=notes.PersonID or DoradoReport.SAP工号=notes.PersonID LEFT outer join CTS ON DoradoReport.员工原工号=CTS.cts_ID OR DoradoReport.SAP工号=CTS.cts_ID LEFT outer join RMS ON DoradoReport.员工原工号=RMS.RMS_ID OR DoradoReport.SAP工号=RMS.RMS_ID LEFT outer join Domain_User ON DoradoReport.员工原工号=Domain_User.user_id and Domain_User.User_kind='Domain Users'
------解决方案--------------------
ALTER VIEW [dbo].[V_Idata] AS SELECT DoradoReport.中文姓,DoradoReport.中文名,DoradoReport.SAP工号,DoradoReport.员工原工号,SAP.employee_ID,notes.PersonID,notes.email, CTS.cts_ID,RMS_LOGONNAME,Domain_User.user_id FROM DoradoReport LEFT outer join SAP ON DoradoReport.SAP工号=SAP.employee_ID LEFT outer join notes ON DoradoReport.员工原工号=notes.PersonID or DoradoReport.SAP工号=notes.PersonID LEFT outer join CTS ON DoradoReport.员工原工号=CTS.cts_ID OR DoradoReport.SAP工号=CTS.cts_ID LEFT outer join RMS ON DoradoReport.员工原工号=RMS.RMS_ID OR DoradoReport.SAP工号=RMS.RMS_ID LEFT outer join Domain_User ON DoradoReport.员工原工号=Domain_User.user_id and Domain_User.User_kind='Domain Users'
------解决方案--------------------
...
ALTER VIEW [dbo].[V_Idata] AS
SELECT DoradoReport.中文姓,DoradoReport.中文名,DoradoReport.SAP工号,DoradoReport.员工原工号,SAP.employee_ID,notes.PersonID,notes.email,
CTS.cts_ID,RMS_LOGONNAME,Domain_User.user_id
FROM DoradoReport LEFT outer join SAP ON DoradoReport.SAP工号=SAP.employee_ID
LEFT outer join notes ON DoradoReport.员工原工号=notes.PersonID or DoradoReport.SAP工号=notes.PersonID
LEFT outer join CTS ON DoradoReport.员工原工号=CTS.cts_ID OR DoradoReport.SAP工号=CTS.cts_ID
LEFT outer join RMS ON DoradoReport.员工原工号=RMS.RMS_ID OR DoradoReport.SAP工号=RMS.RMS_ID
LEFT outer join(select * from Domain_User where User_kind='Domain Users') Domain_User ON DoradoReport.员工原工号=Domain_User.user_id ;
------解决方案--------------------
这个问题很高深的,我反正看不懂,来打一下酱油