Adding Constituency to an Output Set

Hi all -

Having trouble adding Constituency (either short_desc or the ID #) as an option in TR_QUERY_ELEMENT for an output set.  I found an older thread which had some suggestions, but they don't seem to be working for me.

Has anyone successfully done this?  Thanks!

 

-Lisa

Parents
  • Hi, Lisa:

     

    The following will return a constituency (short_desc) if it exists for a particular patron on your list:

     

    1.       Insert a row into TR_QUERY_ELEMENT_PARAMETER with the following values:

    Description:        Constituency

    Data Type:          Number

    End Of Day:        [unchecked]

    Multi Select:       [unchecked]

    Ref Tbl:                 VRS_CONSTITUENCY

    Ref Id:                   id

    Ref Desc:             short_desc

    Ref Where:         [blank]

    Ref Sort:              short_desc

     

    2.       Take note of the id for this line in TR_QUERY_ELEMENT_PARAMETER.

     

    3.       Insert a row into TR_QUERY_ELEMENT with the following values:

    Description:        Customer_Constituency

    Category:            Constituent

    Data Select:        !.short_desc

    Data From:          (select distinct a.customer_no, b.id, b.short_desc from vxs_const_cust a join vrs_constituency b on b.id = a.constituency)

    Data Where:      id = <<p##>> [update ## with the id in your system from TR_QUERY_ELEMENT_PARAMETER]

    Control Group:  [as appropriate for your environment]

    Single Row:         [checked]

     

    Caveat: This will return the constituency ONLY if it belongs to the actual constituent pulled in the query. If Mrs. Gotrocks is your board member and you are pulling the Gotrocks Household account, you won’t see the constituency.

     

    Lucie

     

  • I entered all of this to the letter, and then added it to my output set, but I'm getting this error message:

    SyntaxFromSQL caused these errors: SQLSTATE = 42S22

    Invalid column name 'customer_no'.

    Not sure what I'm doing wrong.

Reply Children
No Data