Sales +1 973 625 1119 Sale@DurkinComputing.com
Welcome Guest Search | Active Topics | Members | Log In | Register

Building a Report from Relationships Watch Topic   
konsulati
Posted: Wednesday, October 05, 2011 10:24:06 PM

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?
jim durkin
Posted: Thursday, October 06, 2011 8:40:33 PM

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
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASP Durkin Theme created by Jim Durkin
Powered by Yet Another Forum.net version 1.9.1.6 (NET v4.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.068 seconds.
9 queries (0.030 seconds, 44.12%).

yaf_pageload: 0.029
yaf_topic_info: 0.000
yaf_forum_list: 0.000
yaf_forum_listpath: 0.000
yaf_forum_listpath: 0.000
yaf_post_list: 0.001
yaf_usergroup_list: 0.000
yaf_usergroup_list: 0.000
yaf_active_listtopic: 0.000