In my package I have Execute SQL Task which is getting some data from the stored procedure, everything is working fine till SP is returing me some result set/Single row.
But there are some condition when stored procedure will not return any result set/single row. Now my Execute SQL task get failed when there is no data returned from the SP but I don’t want that.
I want that if there is no result set I can process some other thing instead of failure.
You’ve a few options here. You may change your constraint from the Execute SQL Task to the next on to be on Completion rather than Success. Or you create an On Error Event Handler for the task Execute SQL Task that would handle getting zero rows. Or you can use the ForceExecutionResult property from the property window for the Execute SQL Task (F4).
You may also read more here