sql server - SSIS : Creating a flat file with different row formats -


i want create flat file output, format of rows different. file has header, middle data rows, footer row. file below

h|deptcode123|deptnamexyz|totalemp300    e|sam|johnson|address1|empcode1|........many other columns e|sam2|johnson2|address2|empcode2|........many other columns e|sam4|johnson3|address3|empcode3|........many other columns e|sam5|johnson4|address4|empcode4|........many other columns          j|300|250000 

how can generate file in ssis. input come different tables, planning write 3 separate queries/ sp's header, middle row , footer row record.

if want create flat file rows has different metadata. have use 1 column flat file connection manager. dt_wstr data type , length = 4000

use 3 consecutive dataflow task using same flat file destination

first 1 write header, second 1 middle rows, third 1 footer.

you can concatenate values select statment or using script component


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -