I am using a DFT that pulls the records from DB where ErrorInd is 1. I want the error records to be placed in a flat file, and if there are no errors I do not want to create any file.
To to this, first I created a variable @RecordCount and this variable is getting assigned using Execute Sql Task right before DFT, then in DFT created oledb source and used query to pull records. Once then I am using conditional split. In conditional split I am giving a condition like @RecordCount > 0, then mapping case1 to Flat file destination.
Somehow, the case is not working, even if the variable @RecordCount is 0 the flat file is getting generated and I do not want to do that.
What I understood is, whatever the case is, the condition is working but flat file will get generate?. How do I handle it? would there be any work around?
PS: the flat file is getting generated dynamically