Viewing 15 posts - 76 through 90 (of 141 total)
O.K. After hours and hours of searching the internet, I came to the conclusion it was a Windows fault not SQL. Any Windows accounts that were created earlier, worked fine...
March 10, 2007 at 4:29 am
I'm soooo stupid. I must of deleted it by accident with all the of cutting and pasting and didn't even notice. Thanks for that.
January 5, 2007 at 12:00 am
I've put the following
IF EXISTS (SELECT * from db1.dbo.view1 WHERE
(db1.dbo.view1.date >= dateadd(hh,-24,getdate()))
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'krha',
@recipients = 'kris@work.com.au',
@query = 'SELECT * from db1.dbo.view1 ...
January 4, 2007 at 9:51 pm
Thanks for that. That worked perfectly.
I hate to be a pain. But I now need an IF clause. If there is no new data don't send an e-mail. Can you...
January 4, 2007 at 5:39 pm
That's what I want to do but I'm not sure of the syntax due to it being a timedate statement.
January 3, 2007 at 7:58 pm
I've actually refined the script a little as below:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'krha',
@recipients = 'kris@work.com.au',
@query = 'SELECT * from db1.dbo.view1' ,
@subject = 'email',
@attach_query_result_as_file = 1
I was hoping someone...
January 3, 2007 at 5:40 pm
Does the first select statement ever change? If not you could create a temp table or maybe better a view and just run the one select statement.
Just a suggestion
January 3, 2007 at 5:15 pm
Your not going to believe it. Obviously the Christmas break wasn't enough for me. I had a typo in the e-mail address
Still the...
January 3, 2007 at 2:27 pm
O.K I've had a play around with this and my question is now. When I run the script, it says that the mail queued. According to BOL that means it's...
January 2, 2007 at 9:03 pm
I'm using 2005. The storedprocedure was the way I was going for. Then I could (as you say) create a job to run everynight. I already have several e-mails that...
January 2, 2007 at 7:07 pm
Cool thanks it's all working with sqlcmd -S Server\Instance -i d:\sql_scripts\script.sql -o\\server\folder\File.CSV -s "," -h -1 -W
December 11, 2006 at 3:38 pm
I've got the script working by doing: sqlcmd -S Server\instance -i "D:\SQL_Scripts\Script.sql" -o "\\server\folder\file.CSV" -s"," - h-1 -W
However I can't get SQL to automate the job. It keeps coming...
December 8, 2006 at 12:51 am
I ran this script and got a syntax error.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'E'.
December 7, 2006 at 7:31 pm
Like you, I'm not very good with Integration Service yet so I'm trying to avoid it at the moment as this is urgent.
Can you give me an example of the...
December 7, 2006 at 7:20 am
I've figured out how to do it for individual jobs by going to the properties of the auto job and choosing Steps - advanced, but it exports too much infomation. ...
December 7, 2006 at 7:02 am
Viewing 15 posts - 76 through 90 (of 141 total)