In list builder, if I select more that one item that originates from the same table with the same column information, list builder creates an "AND" in where clause which is fine. However, this returns 0 records. So my question is, where can I modify how the aliases are assigned when the SQL code is created? I see RP_BUILD_QUERY but that seems to be just for Extractions.
Here is what I get from list builder:
Select Distinct a.customer_no From t_customer a (NOLOCK) JOIN lv_const_cust_current e (NOLOCK) ON a.customer_no = e.customer_noJOIN TX_CUST_KEYWORD f (NOLOCK) ON a.customer_no = f.customer_no Where IsNull(a.inactive, 1) = 1 AND e.constituency in (35) AND f.key_value in ('A') AND f.keyword_no = 403 AND f.key_value in ('Individual') AND f.keyword_no = 402
Here is what I need:
Select Distinct a.customer_no From t_customer a (NOLOCK) JOIN lv_const_cust_current e (NOLOCK) ON a.customer_no = e.customer_noJOIN TX_CUST_KEYWORD f (NOLOCK) ON a.customer_no = f.customer_noJOIN TX_CUST_KEYWORD g (NOLOCK) ON a.customer_no = g.customer_no Where IsNull(a.inactive, 1) = 1 AND e.constituency in (35) AND f.key_value in ('A') AND f.keyword_no = 403 AND g.key_value in ('Individual') AND g.keyword_no = 402
Thanks in advance.
Matt -
I would probably end up using view and a couple of custom elements - even if it pulls the exact same information as the standard criteria element, this would force the extra join that you would be looking for.
Hope that makes sense,
Heather