Monday, March 26, 2012

e-mailing users in SQL 2000

Hello:
Two questions.
First, generally speaking, how do you configure SQL 2000 to e-mail end
users? I have a SQL script that shows, in an accounting database, inventory
items that have not been purchased from a vendor within the last year. I
want to e-mail that list of items to end users on a monthly basis. That
list of items amounts to a report.
Secondly, my script has a specific date. It, basically, says < 06/01/06. I
don't want the IT staff to have to come in and update the date parameter. Is
there a way to place syntax in the script to pull the date from the operating
system?
Thanks!
childofthe1980s> First, generally speaking, how do you configure SQL 2000 to e-mail end
> users?
I suggest you use xp_smtp from www.sqldev.net. The built-in email support in 2000 is based on MAPI
and is a hassle to get working.
> Secondly, my script has a specific date. It, basically, says < 06/01/06. I
> don't want the IT staff to have to come in and update the date parameter. Is
> there a way to place syntax in the script to pull the date from the operating
> system?
Most probably (can't say for sure without knowing anything about your code). Check out the GETDATE()
function.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in message
news:273474B7-38E8-435F-835A-123502316C07@.microsoft.com...
> Hello:
> Two questions.
> First, generally speaking, how do you configure SQL 2000 to e-mail end
> users? I have a SQL script that shows, in an accounting database, inventory
> items that have not been purchased from a vendor within the last year. I
> want to e-mail that list of items to end users on a monthly basis. That
> list of items amounts to a report.
> Secondly, my script has a specific date. It, basically, says < 06/01/06. I
> don't want the IT staff to have to come in and update the date parameter. Is
> there a way to place syntax in the script to pull the date from the operating
> system?
> Thanks!
> childofthe1980s|||Please don't post independently in separate newsgroups. You can add
multiple newsgroups to the header and then all the answers appear as one.
See my reply in the other newsgroup.
Andrew J. Kelly SQL MVP
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:273474B7-38E8-435F-835A-123502316C07@.microsoft.com...
> Hello:
> Two questions.
> First, generally speaking, how do you configure SQL 2000 to e-mail end
> users? I have a SQL script that shows, in an accounting database,
> inventory
> items that have not been purchased from a vendor within the last year. I
> want to e-mail that list of items to end users on a monthly basis. That
> list of items amounts to a report.
> Secondly, my script has a specific date. It, basically, says < 06/01/06.
> I
> don't want the IT staff to have to come in and update the date parameter.
> Is
> there a way to place syntax in the script to pull the date from the
> operating
> system?
> Thanks!
> childofthe1980s

No comments:

Post a Comment