Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

sp_send_dbmail HTML

Posted on 2008-11-03
4
Medium Priority
?
652 Views
Last Modified: 2012-05-05
I have a view that I would like to select about ten fields from and put into an email.  I need to send my email in html format to the persons email that is located on the same table/line in a field called email, but can't get the format right.
In the view, I have fields like name, email, q1,q1ext,q2,q2ext,q3,q3ext,q4,q4ext  I would like to select these fields from the view and display them like the following:
How can this be done?

name
q1        q1ext
q2        q2ext
q3        q3ext
q4        q4ext
0
Comment
Question by:H-SC
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
jogos earned 2000 total points
ID: 22874840
0
 
LVL 1

Author Comment

by:H-SC
ID: 22875959
jogos,

What would the code look like for just html in the body of the email ?
0
 
LVL 1

Author Comment

by:H-SC
ID: 22885861
jogos,

just wanted to follow up.. any ideas?
0
 
LVL 25

Expert Comment

by:jogos
ID: 22886083
I think the the example is clear enough.  
1.  know how your output (HTML) must be -> example of a table in the accepted sollution
2.  how to build html-string: -> shown in example even with the cursor-example to make the tablerows

Sorry,
I share kindly the how to ... but I hate typing code that I can't test (and it feels like free labor to me)
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question