Advertisement

10.31.2007 at 03:52AM PDT, ID: 22929304
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

How do I format the output of @query in an email using SQL 2003

Asked by wrcplc in MS SQL Server

Tags: , , , ,

Hi

I have written the code below which succesfully sends an email attachment of relevant records to the addressees.  My problem is that although the attachment is correct in content it is very badly formatted and is difficult to read.  Is there a way of using the code below but either:

a) formatting the output so it is easily readable,
b) Perhaps exporting as an Excel spreadsheet or CSV file
3) Exporting in any format that you might suggest so it is instantly readable and printable

I have no taboos on this subject as long as it presents to the user a neat readable solution.

One thought I have had whilst writing this email is somehow to introduce a new field which will be a comma between each existing field in the view.  That way it could be delimited.  

As a sub question - how do you make a field in a SQL query/view with just a comma (or any other note)

Any help appreciated

adrian



EXEC master..xp_sendmail @recipients = 'fred@wm.co.uk;ljoe@wm.co.uk',
   @query = 'SELECT * from projsummdb.dbo.vwOutstandingProjectSummaries',
   @subject = 'Missing Project Summaries',
   @message = 'These are the contracts which have ended but for which there is no Project Summary completed as yet.   ,
   @attach_results = 'TRUE', @width = 250Start Free Trial
[+][-]10.31.2007 at 04:34AM PDT, ID: 20184265

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2007 at 04:37AM PDT, ID: 20184277

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: format, output, email, query, using
Sign Up Now!
Solution Provided By: twoboats
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.31.2007 at 04:38AM PDT, ID: 20184285

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2008 at 03:38AM PDT, ID: 22375689

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.08.2008 at 05:21PM PDT, ID: 22423065

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628