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.
| Author |
Topic |
|
Kabelo
Starting Member
1 Post |
Posted - 2007-08-08 : 07:52:57
|
| I wrote a trigger as follows:CREATE TRIGGER TR_ABCON TABLE_AAFTER INSERTASDECLARE @E_MAIL VARCHAR(255), @MESSAGE VARCHAR(255)SET @MESSAGE = 'A new call request has been logged'SELECT @E_MAIL = E_MAILFROM TABLE_A AS ALEFT OUTER JOIN TABLE_B AS BON B.SYSADMIN = A.SYSADMINWHERE SYS_ADMIN = 1EXEC MSDB.DBO.SP_SEND_DBMAIL @profile_name = 'SCINFO', @recipients = @E_MAIL, @body = @MESSAGE, @subject = 'SCI Service Request';The problem is everytime I insert data into the table I get an error stating that-:'At least one of the following parameters must be specified. "@recipients, @copy_recipients, @blind_copy_recipients".Mail queued.'Please help. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-08 : 08:57:43
|
| SELECT @E_MAIL = E_MAILFROM inserted AS ALEFT OUTER JOIN TABLE_B AS BON B.SYSADMIN = A.SYSADMINWHERE SYS_ADMIN = 1also if no row is inserted your @E_MAIL will be null._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|