Write to txt file

I am very new to SSIS. What I want to do is to query, then write each record to text files.
Sample : record 1, account # 123, create a file called 123.txt and then write the rest of the data in this format

customername | Jim Thompson
address           | 123 S. La Cruz
city                  | San Francisco, ca 95555

         Record # 2   account # 345  create text file called  345.txt and write the rest like above.
Who is Participating?
k_murli_krishnaConnect With a Mentor Commented:
At command line or shell prompt, use pipe or redirection operator > to create a file and >> to append to existing one. In SSIS, try these references:

SSIS: Exporting data to a text file using a package
SSIS: Flat File Destination - How To Append Data?
SSIS: Adding footer row to a flat file already containing data
Reza RadConsultant, TrainerCommented:

you need to create new SSIS project

add a oledb data source and connect it to your database(for example sql serever datebase)
add a Flat File destination for your text file
set mappings

and then everything will be fine
you could set delimiter type, set type of text file: delimiter, fixed width or ragged right

Reza RadConsultant, TrainerCommented:
let me know where in the above steps you have problem exactly and I explain more in details.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

VBdotnet2005Author Commented:
Your steps above write to a fle? I want it write each record(above format)on each text file. Your help is greatly appreciated.
Reza RadConsultant, TrainerCommented:
no actually,
the steps above will write each record in one line of text file.
if you want to change the way of writing to text file as above(which is familiar to me from your previous questions), you should use Script Component Transformation between source and destination.

if you need more detailed help,provide a sample table data, and also a sample requested result with more than one row data.
Reza RadConsultant, TrainerCommented:
Did you got the answer to your question ??!!!!!!!!!!!!
I think you can not do this without script component transformation. you should read this format in script and make your output rows in code.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.