Stored Procedures & XP_SENDMAIL

Results 1 to 2 of 2

Thread: Stored Procedures & XP_SENDMAIL

  1. #1
    Join Date
    Dec 1969

    Default Stored Procedures & XP_SENDMAIL

    I have an intranet web that works a lot like a Library system and I would like to run a SP nightly ( on my SQL 2000 DB) that generates a list of users who have books due in a week, then a list of users who have books overdue and creates an email to each imforming them that book "A" is/was due on X date. Somebody must have already conquered this problem. I have XP_SENDMAIL working.. I can retrieve the lists I want to use but how do I put them together in one neat little SP ... is there some sort of FOR or DO loop equivalent in TSQL ??? any help would be greatly appreciated

  2. #2
    Join Date
    Dec 1969

    Default RE: Stored Procedures & XP_SENDMAIL

    Yep, there&#039;s a DO loop<BR><BR>WHILE this = that<BR>BEGIN<BR> --Do something<BR>END

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts