List Query for Schools

I would like to pull a list in List Manager of all constituents having any school recorded on their account under the Research Tab.

I need some help with the manual edit of the query code.  Is there a way to do this without listing the numbers of all 1,500+ schools?

Select Distinct a.customer_no
 From t_customer a (NOLOCK)
JOIN vxs_cust_school e (NOLOCK) ON a.customer_no = e.customer_no
 Where  IsNull(a.inactive, 1) = 1
 AND e.school in  (2,3,4,5,6,7,8,9,13,14,15,16,17,18,20,21,22,23,1458,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74)

Thank you!

Chuck Buchanan

92nd Street Y

 

  • Hey Chuck -

    You could get fancy with this or you could simply do a Heather-special neanderthal edit to be something like:

     

    Select Distinct a.customer_no 
     From t_customer a (NOLOCK) 
    JOIN vxs_cust_school e (NOLOCK) ON a.customer_no = e.customer_no
     Where  IsNull(a.inactive, 1) = 1 
     AND e.school > 0

  • Heather-special.  Hmm…I think we have a new trademark.

     

    +Ryan Creps

    +Tessitura Network

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Heather Kraft
    Sent: Wednesday, November 14, 2012 7:32 PM
    To: Ryan Creps
    Subject: Re: [Tessitura Technical Forum] List Query for Schools

     

    Hey Chuck -

    You could get fancy with this or you could simply do a Heather-special neanderthal edit to be something like:

     

    Select Distinct a.customer_no 
     From t_customer a (NOLOCK) 
    JOIN vxs_cust_school e (NOLOCK) ON a.customer_no = e.customer_no
     Where  IsNull(a.inactive, 1) = 1 
     AND e.school > 0

    From: Charles Buchanan <bounce-charlesbuchanan5408@tessituranetwork.com>
    Sent: 11/14/2012 5:45:53 PM

    I would like to pull a list in List Manager of all constituents having any school recorded on their account under the Research Tab.

    I need some help with the manual edit of the query code.  Is there a way to do this without listing the numbers of all 1,500+ schools?

    Select Distinct a.customer_no
     From t_customer a (NOLOCK)
    JOIN vxs_cust_school e (NOLOCK) ON a.customer_no = e.customer_no
     Where  IsNull(a.inactive, 1) = 1
     AND e.school in  (2,3,4,5,6,7,8,9,13,14,15,16,17,18,20,21,22,23,1458,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74)

    Thank you!

    Chuck Buchanan

    92nd Street Y

     




    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!

  • The Heather-Special is exactly what I was looking for!

    Thanks :)