Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

send mail with a query results as table in email body

$
0
0
Hi,

I have a query that returns a few rows and columns, I'd like to set up a daily email to send it me automatically with this simple table in email body. I created Execute SQL Task that saves query results in a variable of object type but I cannot use this variable to pass the results onto the Send Mail Task as it was not of String type.

Do you know how to achieve it? I've tried to send email using Script Task and retrieve the query data from the variable and pass it on to the email body but couldn't do it. I thought that perhaps through Script Task it was possible to set up.

I found on the net this bit of code
    Dim results As DataSet

    results = CType(ReadVariable("MyAdoVariableName"), DataSet)
but it didn't work as I was getting the message "ReadVariable not declared". Any ideas?

Can you tell me if I'm thinking in the right direction?

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>