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

SQL task - result single row - how to assign value from result to variable

$
0
0

I have a sql task, which is returning a single row (just does a select count(*) )

I need to get that count value into a variable then use it on constraints that come after the sql task.

I think its the query im using that is giving me trouble

SELECT COUNT(*) FROM DB.MyTable where testID = '(?)'

...where testID is a nvarchar(30) type

The error Im getting is something like

"ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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