Dynamic list in stored procedure

Former Member
Former Member $organization

Hi

Is it possible to use a dynamic list in a stored SQL procedure? I would like to create logins on a nightly basis for patrons who fit specific criteria but when I try this in our test system, the list is not updating every time the procedure runs.

Thanks
Jess Levy

SFMOMA
jlevy@sfmoma.org

Parents
  • Here's what got stripped out the first time around:

     

    You need to insert code into your procedure to regenerate a dynamic list. Here’s what I cribbed from a report procedure and stick near the top of local procedures that run using a list. This assumes that you have a parameter called @list_no:

     

    /**regenerate list if necessary**/

    declare     @dynamic char(1)

    set   @dynamic = (select recalc_status from t_list where list_no = @list_no)

    if    @dynamic = 'S'

    goto  static_list

    exec  rp_generate_list

          @list_no = @list_no,

          @display_names = 'N'

    --

    static_list:

     

    /**end**/

  • Former Member
    Former Member $organization in reply to Lucie Spieler

    Thanks for the quick responses!
    Best
    Jess

  • Reply Children
    No Data