0
votes

I want to export a flat file .csv extension from SSIS.

My data is like this:

Customer Customer Name    Address
AA00     Hla Hla,Ms       Yangon
AA02     Kyaw,U           Taunggyi

I want the flat file to have the below format:

Customer Customer Name    Address
AA00     Hla Hla,Ms       Yangon
AA02     Kyaw,U           Taunggyi

I added OLEDB Source & Flat File Destination in Data Flow. My SQL statement is from OLEDB Source

SELECT CustCode AS CUSTOMER, Name as Customer Name , Add as Address 
FROM customer

Now, the export looks like the below.

Customer,Customer Name,Address
AA00,Hla Hla,Ms,Yangon
AA02,Kyaw,U,Taunggyi

So, I want to use a stored procedure that , case. There is Execute SQL task in Control Flow. But I don't know how to execute flat file by using that procedure.

Please kindly suggest

1
What's your current code?Derk Jan Speelman
I added OLEDB Source & Flat File Destination in Data Flow. my SQL stat is from OLEDB Source "SELECT CustCode AS CUSTOMER, Name as Customer Name , Add as Address from customer"Naing99
thank you for your edit. By providing as much information as possible, users will understand your question better and find a solution easier.Derk Jan Speelman
When I edited your question, I left the reference to a stored procedure in the title, in case that had something to do with this that isn't immediately apparent. But there's no mention of a stored procedure anywhere in your question.Eric Brandt

1 Answers

2
votes

You can change the column delimiter property from the Flat File connection manager to Tab:

enter image description here

Image reference: http://sqlknowledgebank.blogspot.com/2013/05/ssis-dynamic-flat-file-connection.html

Additional Information about Flat File connection manager