Reputation: 7201
I am using SSIS 2012
My statement:
Select BOSP from MyTable
Result is not NULL, it returns nothing as seen below.
Problem now is in SSIS if the result is NOTHING like above I need to do something using the Conditional Split, but if there is data then I need to do something else. But using the ISNULL() wont work because there is no NULL.
Is there a condition I can used?
Upvotes: 0
Views: 613
Reputation: 1107
There are 0 number of rows in the result. Our SSIS package will work row by row, if there are 0 number of rows it doesn't gets the output it just executed only.
its better to add extra column at input as null as
Select BOSP from MyTable
UNION ALL
select NULL
Upvotes: 1
Reputation: 19184
Explain what do you want to do in a conditional split if there are no rows? If you want to process just one row, fine, but if you want to do some conditional processing then the conditional split is the wrong element to use.
For example this will give you a dummy NULL row if there are no rows in the table:
Select BOSP from MyTable
UNION ALL
select NULL
where not exists
(select 1 from MyTable)
But now how do you know if that's a real row or not?
Upvotes: 1
Reputation: 1221
What I understand is that there is no data flowing and therefore statements in conditional split are not executed.
Next query with always return a row to examine:
SELECT MAX(column1) FROM MyTable
or
SELECT COUNT(*) FROM MyTable
Upvotes: 0