|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, June 18, 2010 12:54 PM
Points: 1,
Visits: 0
|
|
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!
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:47 AM
Points: 801,
Visits: 1,171
|
|
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.
|
|
|
|