Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Mail thru SQL Server

Author  Topic 

syed
Starting Member

3 Posts

Posted - 2005-01-03 : 08:23:30
here i am using trigger to send mail when any insertion occur in a table ... Its working fine

Create Trigger SMaily ON TLogon
For Insert
As
Begin
EXECUTE master..xp_sendmail
@recipients='myid@india.com',
@subject='Testing SQLMail',
@Message='THIS IS TEST MAIL '
End

Now I want to send mail to last inserted record in a table for a particular person .. now i want to fetch the mailid from the inserted record .. What is the possiblities .. anyone please help me ...

Thanking you..

Cheers

Syed

t1g312
Posting Yak Master

148 Posts

Posted - 2005-01-03 : 08:32:40
quote:
Originally posted by syed

here i am using trigger to send mail when any insertion occur in a table ... Its working fine

Create Trigger SMaily ON TLogon
For Insert
As
Begin
EXECUTE master..xp_sendmail
@recipients='myid@india.com',
@subject='Testing SQLMail',
@Message='THIS IS TEST MAIL '
End

Now I want to send mail to last inserted record in a table for a particular person .. now i want to fetch the mailid from the inserted record .. What is the possiblities .. anyone please help me ...

Thanking you..

Cheers

Syed



"select EmailID from inserted"

Adi

-------------------------
/me sux @sql server
Go to Top of Page
   

- Advertisement -