Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emailing sql query in body of email

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
CA
This is driving me mental. I am a SQL 2000 admin that just recently started using SQL 2005 and now have to use Visual Studio.

A. Added a OLE DB Source in data flow, which looks at a sql view. Preview sees the data. The Data Flow Task now appears in the Control Flow.
B. In the Control Flow, added the Send Task, entered SMTP and email addresses.
C. Dragged the green arrow button from the Data Task to the Send Email, so logically, this to me would tell it to email the data to the email, but when I debug, it sends a blank email, even though the results of the data has results.

Am I missing a step? How do I get the view to email in the body of the email and if there are no results of the view, to not email it?

I am confused as to the messagesourcetype. Direct Input doesn't work as I'm not typing in a constant email, file connection doesn't work as it's not an attachment and variable doesn't work either. Is there not an option to send "results" of a query?

I miss DTS so much.

 
I gave up completely and just created a stored procedure to query, then using dbmail to email the results, then scheduled a job. Why use SSIS at all?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top