How do I solve the following problem? Thanks.
Update cmp12.dbo.tAccounting
set WinLossFlag='1'
from cmp12.dbo.tJunketType jk, cmp12.dbo.tArea a, cmp12.dbo.tLocn l, cmp12.dbo.tAccounting ac
where EXISTS(
Select g.GroupCode,jt.JunketTypeName From tJKCasinoGroup jg, tJunketType jk
inner join tGroup g on jg.GroupId=g.GroupId
inner join tJKDetails jd on jg.PlayerId=jd.PlayerId
inner join tJunketType jt on jt.IdentTypeId=jd.JunketTypeId
where jg.ParentGroupId is null)AND
(jk.JunketTypeName='Local') AND
(a.AreaId=l.AreaId) AND
(ac.AreaID=a.AreaId)
Msg 4104, Level 16, State 1, Line 6
The multi-part identifier "jg.GroupId" could not be bound.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "jg.PlayerId" could not be bound.