 Rank: Advanced Member Groups: Member
Joined: 9/6/2011 Posts: 223 Points: -505 Location: 92780
|
I would like to build a report for a contact.relatedTo (if there is such a field) but cannot find the table that stores the relationship.
Any clues?
|
 Rank: Advanced Member Groups: Administration
, Moderator
Joined: 2/8/2008 Posts: 617 Points: -313 Location: Denville NJ USA
|
There is a bridge table named CONTACT_CONTACT in the ACT database. You need this table to bridge together tow contact table:
CONTACT1->CONTACT_CONTACT->CONTACT2
In SQL it would look like this:
SELECT CONTACT.Contact, CONTACT_CONTACT.Relationship, CONTACT_CONTACT.[Relationship From], CONTACT1.Contact AS CONTACT1 FROM CONTACT INNER JOIN CONTACT_CONTACT ON CONTACT_CONTACT.CONTACTID1 = CONTACT.CONTACTID INNER JOIN CONTACT CONTACT1 ON CONTACT_CONTACT.CONTACTID2 = CONTACT1.CONTACTID
Hope this helps -- Jim Durkin
|