VBdotnet2005
asked on
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
etc
Record # 2 account # 345 create text file called 345.txt and write the rest like above.
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
etc
Record # 2 account # 345 create text file called 345.txt and write the rest like above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
let me know where in the above steps you have problem exactly and I explain more in details.
ASKER
reza_rad
Your steps above write to a fle? I want it write each record(above format)on each text file. Your help is greatly appreciated.
Your steps above write to a fle? I want it write each record(above format)on each text file. Your help is greatly appreciated.
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.
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.
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.
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.
you need to create new SSIS project
add a DATA FLOW TASk
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