Is there a table that indicates if an address (or phone) is inherited?
Gloria,
I don't think there is a table that spells this out explicitly. But you could extrapolate something into a view. By looking for customer numbers in T_ADDRESS that don't have any addresses marked as primary.
The other place I would suggest looking for a bit of head start on it is the Table-valued Function FT_GET_PRIMARY_ADDRESS. It handles returning a primary address for any constituent, even if it is inherited.
Sorry if this is a restatement of the obvious. The business rule is pretty simple: Only primary addresses can be inherited, always from the household to a primary affiliate. A primary affiliate’s address cannot be used to inherit to another affiliate or the household itself.
Bearing that in mind, it’s simply a matter of finding where the primary address’s owner (customer_no) doesn’t match the current customer_no. Something like this:
Select c.lname, c.fname, a.*
From dbo.FT_GET_PRIMARY_ADDRESS() a
JOIN dbo.T_CUSTOMER c on a.customer_no = c.customer_no
Where Not Exists (Select * From T_ADDRESS x Where x.address_no = a.address_no and x.customer_no = a.customer_no)
Thanks Levi. That’s a good idea.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Levi Sauerbrei Sent: Wednesday, March 13, 2013 3:45 PM To: Gloria Ormsby Subject: Re: [Tessitura Technical Forum] Table that shows an address is inherited
From: Gloria Ormsby <bounce-gloriaormsby5026@tessituranetwork.com> Sent: 3/13/2013 2:29:49 PM
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
+Ryan Creps
+Tessitura Network
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Gloria Ormsby Sent: Wednesday, March 13, 2013 3:32 PM To: Ryan Creps Subject: [Tessitura Technical Forum] Table that shows an address is inherited
Thank you, Ryan
Your SQL was very helpful and appropriate.
I’m trying to identify many possible duplicates after our recent import of patron data.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Ryan Creps Sent: Thursday, March 14, 2013 09:16 To: Wendell Baskin Subject: Re: [Tessitura Technical Forum] Table that shows an address is inherited
From: Levi Sauerbrei <bounce-levisauerbrei7046@tessituranetwork.com> Sent: 3/13/2013 2:37:58 PM
Thanks Ryan.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Ryan Creps Sent: Thursday, March 14, 2013 10:20 AM To: Gloria Ormsby Subject: Re: [Tessitura Technical Forum] Table that shows an address is inherited
Hey Ryan,
I’m getting huge results and when I look at the records the individual is inheriting the address. I can’t seem to get the results I want which are all accounts with primary addresses that are not inherited from a household. The results are including individuals that are not part of a household and those people don’t apply. Do you have another suggestion?
Gloria
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Gloria Ormsby Sent: Thursday, March 14, 2013 10:24 PM To: Gloria Ormsby Subject: RE: [Tessitura Technical Forum] Table that shows an address is inherited