1
我做的兩個內連接聯接:錯誤做2內時,在同一個查詢
use SalesDWH
go
select COUNT([specimen id]) as [count],[practice name],qlmlismapping.[mlis practice id],[practice code],[Requesting Physician]
from quicklabdump a
inner join qlmlismapping b
on (b.[quiklab practice code] = a.[practice code])
inner join PracticeandPhysician c
on (a.[Requesting Physician]=c.doctorfirstname+' '+c.DOCTORLASTNAME)
where [DATE entered] between '12/1/2011' and '12/31/2011'
group by quicklabdump.[practice name],qlmlismapping.[mlis practice id],[practice code],[Requesting Physician]
order by [count] desc
,並收到此錯誤:
Msg 4104, Level 16, State 1, Line 10
The multi-part identifier "quicklabdump.practice name" could not be bound.
Msg 4104, Level 16, State 1, Line 10
The multi-part identifier "qlmlismapping.mlis practice id" could not be bound.
Msg 4104, Level 16, State 1, Line 3
The multi-part identifier "qlmlismapping.mlis practice id" could not be bound.
我在做什麼錯?連接是否不正確?