Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Join not working
Mon, Jul 10 2006 2:43 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

The following aint working

SELECT
Site._Switchboard
FROM Calls
LEFT OUTER JOIN Companies C ON Calls._fkCompanies = C._ID
LEFT OUTER JOIN Career J ON Calls._fkCareer = J._ID
LEFT OUTER JOIN Sites Site ON Calls._fkCompanies = Site._fkCompanies AND  J._fkSites = Site._SiteID

Its a very simplified version Smileythe last join isn't working correctly Site._Switchboard is blank.

The problem is the final "AND  J._fkSites = Site._SiteID"  if I replace that with "AND Site._SiteID = 0" it works. Naturally that's not a real option


Roy Lambert
Tue, Jul 11 2006 4:14 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I found my problem - I hadn't initialised the field so it was null not 0

Roy Lambert
Image