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.
ThanksJess Levy
SFMOMAjlevy@sfmoma.org
static_list:
/**end**/
_____________________________________________
Lucie Spieler Florida Grand Opera
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'
--
Thanks for the quick responses!BestJess