0
誰能幫我修改下面的子查詢到加盟條件,使我們可以提高腳本更改子查詢到加盟條件
from #Head hw
join Employee et
on hw.EmployeeCode = et.EmployeeCode
and et.BonusFlag = 1
join Bonus cb
on hw.BonusId = cb.BonusId
and cb.CompanyId = @CompanyId
join bonus b
on hw.BonusId = b.BonusId
join Expense pr
on pr.CompanyId = @CompanyId
and pr.ModuleId = b.ModuleId
Where hw.BucketId = @BucketId
and upper (et.EmployeeCode) <> 'H'
and hw.bucketcode not in (Select centercode from NExclusion)
請學會使用正確的'JOIN'語法。從不在'FROM'子句中使用逗號。 *始終*使用正確的顯式'JOIN's。 –