July 22, 2003 at 8:23 am
need help how to send a email with query !!
-------------------------------------------
Send SMTP mail directly from any version of MS SQL Server.
-----------------------------
the Instructions is in this site http://www.thorpesoftware.com/
-----------
declare @query varchar(200)
exec master.dbo.xp_SMTPSendMail80
select @query = N'select * from sysusers',
'user@server.net',
'user@server.net',
'server.mail',
'help error'
------------
i get this error
-----------
Server: Msg 141, Level 15, State 1, Line 7
A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
-------------------------------
thnks ilan
July 25, 2003 at 1:39 am
wild guess :
exec master.dbo.xp_SMTPSendMail80 @query = N'select * from sysusers',
'user@server.net',
'user@server.net',
'server.mail',
'help error'
btw It's a nice practice to name your sp-parameters because it will not get you into troubles when you swap them when the sp is altered.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply