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 |
svicky9
Posting Yak Master
232 Posts |
Posted - 2006-08-30 : 12:26:41
|
Hi FriendsI am trying to generate a report from the following table using triggers and xp_sendmailwhen i use the parameter @query as select * from employees it returns only the column names where as when you type in select employeeid from employees it returns the column data properlywhats the solution???This is the sample triggeralter TRIGGER Trigger_on_Table1ON northwind.dbo.employeesFOR DELETE, INSERT, UPDATE AS BEGIN exec master..xp_sendmail@recipients = "vic",@message = "The Table employees is modified",@query = "select Employeeid,lastname,firstname,Title from Northwind.dbo.employees"ENDGOVic |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-08-30 : 12:30:07
|
>> using triggers and xp_sendmailnot a good ideaIs it a problem with the width of the data?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
svicky9
Posting Yak Master
232 Posts |
Posted - 2006-08-30 : 12:41:03
|
i want to execute select * from employees but it does not execute itWhen i try select <column names> from employees it works.Can you please tell me why using triggers and xp_sendmail not a good idea :-)Thanks in advanceVic |
 |
|
|
|
|