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.