SQL script for "Replace with HH and add all primary affiliates

Former Member
Former Member $organization

Hi everyone, 

Apologies if this is a really daft question, I'm still developing my SQL muscles.

I know that when you create a List and then try to grab the SQL code using Show Query that the code shown doesn't cover any of the selections you've made in the bottom section of the List Manager criteria window, such as "Replace with Household and add all primary affiliates".

I was wondering if someone knows the code for this? Finding all constituents in a HH AND the HH itself given a specific set of criteria is something that comes up quite often, but I've been struggling with the best way to do this, save a bunch of joins to T_AFFILATION (which usually leaves me in a tangle).

Ideas?

Thank you muchly in advance!

Meg 

Parents Reply Children
No Data