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 |
|
tejicen
Starting Member
17 Posts |
Posted - 2009-07-14 : 08:40:00
|
| Hi,why do i get this message?(1 row(s) affected)Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 476Query execution failed: Msg 102, Level 15, State 1, Server MOBILLSRV06, Line 1Incorrect syntax near '@tmpTbl'.create proc [dbo].[EMAILINFO]@inValue varchar(255)asbegindeclare @tmpTbl table ( value varchar(255))insert into @tmpTblselect value = @inValueexec msdb.dbo.sp_send_dbmail@profile_name = 'info',@recipients = 'info@mobill.se',@importance ='High',@query = 'select * from databas.dbo.@tmpTbl',@subject = 'TEST',@query_attachment_filename ='Results.txt'endregards, tejicen |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|
|