Community
Showing results for 
Search instead for 
Do you mean 
Reply

Querying database tables secondary contacts to link back to parent contact and company

New Member
Posts: 2
Country: USA

Querying database tables secondary contacts to link back to parent contact and company

Hello,

I am using SQL server, ACT reader login, to access the database tables for ACT 2010.  I was able to access the contacts from the tbl_contact table.  I am now trying to link the secondary contacts (tbl_contact.TYPENUM = 2) back to the "parent" contact, but I don't see how.  The contactid field for the secondary does not link to any other table. The companyid and companyname fields are NULL for the secondary contacts.  I need to "pull" this data and associate it back the parent.  Does anyone know how to do this?  Thanks in advance. Tony.

Platinum Elite Contributor
Posts: 6,662
Country: USA

Re: Querying database tables secondary contacts to link back to parent contact and company

If you're getting that involved with the database you should use the SSMS to create a field map of the database.

Roy Laudenslager
ACT! Certified Consultant
ACT! Report Expert
Durkin Impact Report Designer
www.techbenders.com
royel@techbenders.com
541-343-8129
Copper Contributor
Posts: 150
Country: Belgium

Re: Querying database tables secondary contacts to link back to parent contact and company

There's a table TBL_Secondary.

 

SELECT [SECONDARYID]
      ,[CONTACTID]
      ,[CREATEUSERID]
      ,[CREATEDATE]
  FROM [TBL_SECONDARY]

 

Secondary ID is the GUID for your secondary contact, CONTACTID is the GUID for the primary contact.

New Member
Posts: 2
Country: USA

Re: Querying database tables secondary contacts to link back to parent contact and company

Thank you very much.  That works.Smiley Very Happy