ssis package to create Flat File but if no records returned write "No records to process" in flat file

  • I am new to writing ssis packages and am having a problem with creating a flat file.

    I need to create a file every hour of records updated since the last time this package was run, but if there are no records found I still need to create the file with a row containing "No records found in the process".

    Have been trying use if exists (select ...) Create file else 'write no records found" in file.

    any help would be greatly appreciated!

  • In SSIS there is a pretty easy way to do this. In the control tab first do a select count(*) in an SQL task. save the output to a variable. The next step could be one of two paths. if you double click on a trasform path then you can add an expression. If count is 0 then output flat file with text. If the count is > 1 then move to the data flow

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply