Home Forums SQL Server 2005 Development Passing variable to @query variable in sp_send_dbmail stored procedure RE: Passing variable to @query variable in sp_send_dbmail stored procedure
spaghettidba
SSC Guru
Points: 105732
More actions
March 18, 2016 at 2:03 am
#1866063
I see no variable passed to the query for sp_send_dbmail. You're concatenating the value '22' to the query, which is the only way to execute queries with parameters in dbmail.
sp_send_dbmail cannot accept parameterized queries.
-- Gianluca Sartori