Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Creating html file from within stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-17 : 13:44:22
Amish writes "I want to send email as an attachment using stored procedure.
I know how to send email in sql server .
But my problem is that I have no idea/clue of how to create HTML file dynamically in the stored procedure!!!!.
This HTML file created will be sent as an attachment.
We are using SQL SERVER 2000 & operating system is WINDOWS 2000.

Could you explain how this can be done?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-06-17 : 13:46:18
Take a look at the sp_makewebtask system procedure in Books Online. It allows you to create static web pages based on SQL queries. You can use HTML template files to control the formatting.

Once you run the query and use sp_makewebtask to generate the HTML page, then you can attach it to the email.

Go to Top of Page
   

- Advertisement -