I have a SQL Server Script Task.
This task queries a table and checks for the existence of a record from the current Day.
It basically returns a Row Count of Zero or 1.
The resultset variable if the Execute SQL Task is v_BasisControlRowCount.
The next task is a Script Task.
I set the v_BasisControlRowCount as a ReadWrite Variable.
I want to check the value of the variable.
If the v_BasisControlRowCount is zero I want to fail the package, if it is 1 I want the package to succeed.
Dim BasisControlRowCount As Integer = 0
BasisControlRowCount = Dts.Variables("v_BasisControlRowCount").Value
I can't remember how to do this and I'm having trouble with the syntax.
Could someone please tell me how to do this?
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/