0

I get the following error

Msg 4104, Level 16, State 1, Line 13
The multi-part identifier "OCS2.PackageType" could not be bound.

when trying to bound multiple times to a table, I can't see what the problem, can anyone help?

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' 

1 Answer 1

2

Left Outer Join OS_CerifiedForPackage **OSC2**

You're trying to access OCS2. Just a simple typo :)

Sign up to request clarification or add additional context in comments.

3 Comments

I wish I had sharp eyes, just Ctrl+F ;)
wow that's embarrassing, been looking at that for ages! thanks mate
No problem. If you haven't stared at a problem for half an hour, just to find out it was a typo, you're not a real developer :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.