我试图从一天开始解决以下查询,但我没有得到输出..
查询是:
select distinct L.LeadBudget,L.CompanyName,L.LeadTitle,L.Status,
E.Name as OwnerName,E.Name as
CreatedUser
from Leads L,Employee E where L.LeadId='2'
and E.EmployeeId=L.LeadOwner and E.EmployeeId=L.CreatedUserId
在上面的查询中我想得到
E.Name as OwnerName and E.Name as CreatedUser
from a single Employee tables)..where E.EmployeeId=L.LeadOwner and
E.EmployeeId=L.CreatedUserId
如果我在没有 OwnerName 或 Created User 的情况下执行,我将获取数据..但我想同时获取这两个名称。