Rakki
2004-11-18 20:18:24 UTC
Hi ,
I get the error ODBC error 208 (42S02) Invalid object name when I
execute this
Due to the multiple conditions I had to use the temp table, Depending
on the conditions email is send for that group only.
insert into #emp(emp,empname,group)select empid,emplyeename,groupnum
from emp
EXEC Master..xp_sendmail
@recipients = 'johnd',
@query = 'SELECT * FROM #Emp where group=1',
@subject = 'SQL Server Report',
@message = 'The contents of Emp:',
@attach_results = 'TRUE', @width = 250
EXEC Master..xp_sendmail
@recipients = 'johnd',
@query = 'SELECT * FROM #Emp where group=2',
@subject = 'SQL Server Report',
@message = 'The contents of Emp:',
@attach_results = 'TRUE', @width = 250
----
----
I continue for all the groups. I have more than 10 groups like this.
can anyone please help me to solve this.
Thanks
Rakki
I get the error ODBC error 208 (42S02) Invalid object name when I
execute this
Due to the multiple conditions I had to use the temp table, Depending
on the conditions email is send for that group only.
insert into #emp(emp,empname,group)select empid,emplyeename,groupnum
from emp
EXEC Master..xp_sendmail
@recipients = 'johnd',
@query = 'SELECT * FROM #Emp where group=1',
@subject = 'SQL Server Report',
@message = 'The contents of Emp:',
@attach_results = 'TRUE', @width = 250
EXEC Master..xp_sendmail
@recipients = 'johnd',
@query = 'SELECT * FROM #Emp where group=2',
@subject = 'SQL Server Report',
@message = 'The contents of Emp:',
@attach_results = 'TRUE', @width = 250
----
----
I continue for all the groups. I have more than 10 groups like this.
can anyone please help me to solve this.
Thanks
Rakki