Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not a self-join but a

    I have a database of with a people table and a relationship table. The relationship table is pretty simple: key, people1, relation, people2, note. I use it to show relationships between people.

    PEOPLE TABLE RELATION TABLE
    People Key

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not a self-join but a

    If I understand you, the problem is that when you show a primary record for Mark, you won't see the Susan referred Mark record but only the Mark is related to Susan record, right? You can build your subform based on SQL something like this, substituting real table and field names and values:

    Select * from tblRelationship Where People1 = 'Mark' or People2 = 'Mark'

    You would have to translate this into true SQL, but the equivalent should return all records with Mark in either position.

    As for the question of self-joins, self-joins are on fields within the same table. So if you have a field in your People table for Father, and it pointed to another record in People, that would be a self-join. What you're doing is using a join table to relate the records. It would not be possible to use a true self-join to make the connections you're trying to make.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Apr 2001
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not a self-join but a

    Good grief, I just realized that I never thanked you for the quick reply. I read the post and ran off and started messing with my database and forgot say thanks.

    This coming a full ten days after you responded to my post within 24 hours. Thanks! You guys are unbelievable.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not a self-join but a

    Glad to help. Thanks are appreciated because they let everyone know whether the advice was useful, but we don't charge a fee if you forget. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •