0

我收到以下错误

消息 4104,级别 16,状态 1,第 13 行
无法绑定多部分标识符“OCS2.PackageType”。

尝试多次绑定到一张桌子时,我看不出有什么问题,有人可以帮忙吗?

use osdp068a

select 
    AU1.UserName As XPSubmittedBy, PD.RegionName As XPRequestingRegion, 
    PD.BusinessGrpName As XPBusinessGroup, AU2.UserName As XPAppRequesterName, 
    AU3.UserName As XPAppOwner, AU4.UserName As XPUATOwner,
    AU5.UserName As W7SubmittedBy, PD.RegionName As W7RequestingRegion, 
    PD.BusinessGrpName As W7BusinessGroup, AU6.UserName As W7AppRequesterName, 
    AU7.UserName As W7AppOwner, AU8.UserName As W7UATOwner,
    PD.PackageCode, SUBSTRING(PD.PackageCode,6,6) AS Application_Packagecode_Version, 
    PD.LangCode, PD.LicencingMethod,
    OSC1.PackageType As PackageTypeXP, PD.InstallFilename As XPInstallInstructions, 
    PD.ReadMeFilename As XPReadMe,
    OCS2.PackageType As PackageTypeW7, PD.InstallFilename As W7InstallInstructions, 
    PD.ReadMeFilename As W7ReadMe
from 
    PackageDetail PD
/*XP*/
Join 
    aspnet_Users AU1 On PD.CreatedBy = AU1.UserId
Join 
    aspnet_Users AU2 On PD.ApplicationRequesterID = AU2.UserId
Join 
    aspnet_Users AU3 On PD.ApplicationOwnerID = AU3.UserId
Join 
    aspnet_Users AU4 On PD.UATOwnerID = AU4.UserID
/*W7*/
Join 
    aspnet_Users AU5 On PD.CreatedBy = AU5.UserId
Join
    aspnet_Users AU6 On PD.ApplicationRequesterID = AU6.UserId
Join 
    aspnet_Users AU7 On PD.ApplicationOwnerID = AU7.UserId
Join 
    aspnet_Users AU8 On PD.UATOwnerID = AU8.UserID
Left Outer Join 
    Region_CertifiedForPackage RC1 On PD.ID = RC1.PackageDetail_ID
Left Outer Join 
    OS_CerifiedForPackage OSC1 On PD.ID = OSC1.PackageDetail_ID AND OSC1.OSName_Certified = 'XP'
Left Outer Join 
    OS_CerifiedForPackage OSC2 On PD.ID = OSC2.PackageDetail_ID AND OSC2.OSName_Certified = 'WIN 7'
4

1 回答 1

2

Left Outer Join OS_CerifiedForPackage **OSC2**

您正在尝试访问OCS2. 只是一个简单的错字:)

于 2013-10-03T07:25:09.600 回答