ssis - How to write extract Row Count to Trailer record in flat output file -
i used transformation object "row count" capture number of rows written external flat file , want add trailer record file.
currently, append traielr record same file reexecuting sql used extract detail records , counting rows returned, this:
select 't' tlr_rec_type, tlr_nbr_records = ( select count(1) + 2 --include header row , trailer row in count (***=insert sql used query detail records here***) )
i trying use teh rowcount transformatiobn obejct first time. believe have set detail rowcount in user variable. how write user variable trailer record trailer row has format:
t,{rowcount}
add derived column references user variable.
Comments
Post a Comment