Hi all,
I am getting the following error when I run the code below:-
[[Microsoft][ODBC SQL Server Driver][SQL Server]The multi-part identifier "k.groupid" could not be bound.
select k2.name, k.firstname + ' ' + k.lastname "User Name", k.name "Login Name",
convert (char(10), max(d.auditdate), 111) "Last Login Date"
from kuaf k,dauditnew d
Inner join kuaf k2 on k.groupid = k2.id
where d.performerid = k.id
and not exists (select performerid from dauditnew
where (performerid = k.id) and (auditid = 23)
and (auditdate >= (getdate()-%1))) and k.deleted <> 1 and k.type = 0
and k.userprivileges = 15
and k.id NOT IN ('1000','2022','2023','4093','425718')
group by k.lastname, k.firstname, k.name, k.groupid, k2.name
order by k.lastname
If I take out my Inner Join then the report runs ok, but I have added the inner join so that I can get the group name of users listed. Can anyone see any faults with my inner join?
Kind regards,
Fraz