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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -