how to send a email before one day of myselecteddate.

  • Hi All,

    I have a table with one column as date field myselecteddate. If the current date is one day before myselecteddate I need to send an email through sql server.

    I will use datediff and find the difference between myselected date and Currentdate. Then if some rows returns 1 . Then how to fetch them if difference =1 and send an email.

    Any suggestions or ideas will be helpful.

    Thanks.

  • Make an attempt with your own logic and i'll help fill in the gaps.

    E.g.

    if comparison

    begin

    send email

    end

    or maybe this is enough



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • hint: you can use exists()

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply