How yould i loop trought all the records in a table and fetching a specic record that is flagged and sending for each record found a email with that records data to a mail recipient. this should be part of a step in a sql job. PLZ HELPHad a little problem in understanding your phrases. You may check cursor in BOL for looping actions.|||create proc abc as
declare c1 cursor as select primary key from table name where condition
open c1
while (@.@.fetch_status =0)
begin
exec xp_sendmail ....
fetch next
end
something like this and schedule as job !!!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment