Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dowens
Yak Posting Veteran
82 Posts |
Posted - 2005-10-27 : 12:21:09
|
| How does the join work with regards to the Vendor?I've never come across a join where there are multiple ON's for one table see below.FROM dbo.dw_ProvRegion_EffDt_PhysVendor PV INNER JOIN (SELECT PRE.*, BL.CapWthdGL FROM dw_ProvRegion_EffDt_Capacity PRE, dw_BusinessLine BL WHERE PRE.LOB = BL.BusCd) PR ON PV.Provider = PR.Provider COLLATE SQL_Latin1_General_CP1_CI_AS AND PV.LOB = PR.LOB COLLATE SQL_Latin1_General_CP1_CI_AS AND PV.Region = PR.Region COLLATE SQL_Latin1_General_CP1_CI_AS AND PV.EffDt = PR.EffDt RIGHT OUTER JOIN dw_Physician PH LEFT OUTER JOIN dw_Physician_ProvSpec PS ON PH.PhID = PS.PhID LEFT OUTER JOIN dw_Vendor VN ON PV.Provider = VN.VendorNumber ON PR.Provider = PH.PhID LEFT OUTER JOIN dw_Physician_LOB_PcpAssoc PA ON PH.PhID = PA.PhID |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
dowens
Yak Posting Veteran
82 Posts |
Posted - 2005-10-27 : 12:40:31
|
| Big learning curve here.The query does work.Not sure what you mean by read link in the sig....! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|