How can we help you today? How can we help you today?

Simple INNER JOIN candidates bereft of FK

Code is simple:
SELECT *
  FROM dbo.IndividualOrganization io
       INNER JOIN dbo.Individual ind
               ON ind.IndividualID = io.IndividualID
              AND ind.IsActive     = 1
       INNER JOIN dbo.Organization org
               ON
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.

Version: 4.0.2.57
(Table and all relationships have been around for all the time SQL Prompt has existed and the cache is refreshed.)
PDinCA
0

Comments

4 comments

  • Anu D
    Many thanks for the post.

    Can you kindly confirm that following option is checked:

    SQL Prompt 4 --> Options --> Suggestions --> Join Conditions --> Individual coulmns in multiple-column foreign keys ?
    Anu D
    0
  • PDinCA
    Confirm that option is checked. Columns with matching names is checked. Columns with matching data types is not.
    PDinCA
    0
  • Anu D
    Thanks for the update.

    I have dropped you an email can you kindly let us know your views on that.
    Anu D
    0
  • PDinCA
    SQL Compare scripted DB emailed... Thanks.
    PDinCA
    0

Add comment

Please sign in to leave a comment.