OK
So what you can do is use the ExecuteSQL task to read the results into a
Global variable Rowset
You can then iterate over that. To store each row value in a GV would be
expensive as how many GVs do you know to declare? Use?
You can then use that Rowset and assign it to a Recordset object and read
the rowcount if you wish.
You then build up your SendMail task accordingley
How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)
Changing the DTS Send Mail Task
(http://www.sqldts.com/default.aspx?235)
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know
"Mariame" <Mariame_Waguih (AT) yahoo (DOT) com> wrote
Quote:
Hi Everyone
Im a Beginner in using DTS
i m using a package in SQL Server That execute an sql query:
& i want to write the query in ActiveX Script so if it returns rows , i
want it to keep the first field for each row as a global variable and call
another task that send email to send email as the count of rows
and if it doesent return any row it skip all following tasks
How Can I Do It????????
Thx in Adv |