trigger-email attachment list

  • Insert trigger

    Table A

    Col A ColB

    A 12

    B 12

    C 13

    D 15

    table B

    A ABCD

    B BCDE

    C CDEF

    D DEFG

    I need a trigger that sends an email each time a value of 12 is inserted in this table . The email should contain a text attachment showing all the rows which have 12 in their B column with the latest being on the top .

    email should have this data : (a join from the 2 above tables )

    A 12 ABCD

    B 12 BCDE

    Thanks

  • basically, you just want to perform an exists on the inserted table to check for the 12 value, and send the email querying the inserted table again to produce the query results and send via SQLMail.

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

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