Simple INNER JOIN candidates bereft of FK

PDinCAPDinCA Posts: 642 Silver 1
edited October 13, 2009 12:15PM in SQL Prompt Previous Versions
Code is simple:
  FROM dbo.IndividualOrganization io
       INNER JOIN dbo.Individual ind
               ON ind.IndividualID = io.IndividualID
              AND ind.IsActive     = 1
       INNER JOIN dbo.Organization org
I expect the candidate list to show me declared FK's but in this case, all I get are the column name matches between ind and org - the FK from Organization to IndividualOrganization (an intersecting Entity that carries additional data) is entirely missing... Should be
ON org.OrganizationID = io.OrganizationID
Strangely, after I manually code the above join then code another JOIN to the same IndividualOrganization table, the candidate list gives me the FK
INNER JOIN dbo.Position psn
               ON io.PositionID = psn.PositionID
I searched this Forum for "Foreign Key" but none of the posts showed the same issue.

This happens FREQUENTLY when an intersecting entity is feature first.

(Table and all relationships have been around for all the time SQL Prompt has existed and the cache is refreshed.)
Jesus Christ: Lunatic, liar or Lord?
Decide wisely...


Sign In or Register to comment.