I want to know if is possible save a PRINT SQL text into SSIS variable.
My query is:
IF EXISTS (SELECT * FROM TABLE WHERE month = '1' or month = '2' or month = '3' or month = '4'
or month = '5' or month = '6' or month = '7' or month = '8' or month = '9')
BEGIN
PRINT = 'EXIST'
END
ELSE
BEGIN
PRINT = 'NOT_EXIST'
END
I need exist or not_exist to execute a flowfile or another. I tried with ResultSet(SingleRow) but I am not able. What its the best way?
Thanks





SELECT 'EXIST' AS StatusandSELECT 'NOT_EXIST' AS Statusset the result set on the execute sql task tosingle rowthen on the Result Set page map it your variable.Result Namewould be Status and then pick your variable.