CampbellNash / CERIO001.dev.CampbellNash.com

Campbell Nash CERICO Development
http://cerio-live.azurewebsites.net/
2 stars 0 forks source link

Getmysupplier SP problem #66

Closed CampbellNash closed 11 years ago

CampbellNash commented 11 years ago

When running the SP we were always getting the supplier back as Compliant when they were not.

CampbellNash commented 11 years ago

I have changed the SP line 11 from SELECT Approved, Companies., CASE WHEN EXISTS(SELECT * FROM StandardQuestionnaire WHERE ClosedBy > 0 AND CompanyID = CompanyID) to SELECT Approved, Companies., CASE WHEN EXISTS(SELECT * FROM StandardQuestionnaire WHERE ClosedBy > 0 AND CompanyID = CompanyConnections.SupplierCompanyID)

We are now getting the expected results.