![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
I'm able to send an email from query analyzer with this: master..xp_sendmail @recipients = 'jj297 (AT) yahoo (DOT) com', @subject = 'Over Due Resource Library Item', @message = 'Your item is overdue please return it' What I want to do is add a parameter so I've tried this but getting Line 3: Incorrect syntax near '='. (the @recipients line) master..xp_sendmail declare @requestoremail varchar(75), @recipients = 'jj297 (AT) yahoo (DOT) com', @subject = 'Over Due Resource Library Item', @message = 'Your item is overdue please return it', @query = 'select Libraryrequest.LoanRequestID, Titles.Title, requestors.requestoremail, libraryrequest.requestdate,libraryrequest.shipdate ,libraryrequest.duedate from libraryrequest join requestors on requestors.requestorid=libraryrequest.requestorid join Titles on Titles.Titleid = Libraryrequest.titleid where duedate < getdate() and requestoremail='@requestoremail'' Can someone tell me what I'm doing wrong. Thanks. |
|
master..xp_sendmail |
|
declare @requestoremail varchar(75), |
|
@recipients = 'jj297 (AT) yahoo (DOT) com', |
![]() |
| Thread Tools | |
| Display Modes | |
| |