Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to use SSIS to export text file

$
0
0

Hi

I try to export data  to a text file with SSIS and I hope my format is fixed length.

For example:

I have table which 3 fields, the format is below.

    [ITEM_NUMBER] [nvarchar](2) NOT NULL,
    [NAME] [nvarchar](5) NULL,
    [ON_HAND] [numeric](13, 3) NULL

When I export it to a text file, the data I hope

it like this==>I1 test            1.0

Not like this ==>I1 test1.0

In the SSIS, I use replicate(' ', (16-len(on_hand)))+CONVERT(varchar,on_hand) as on_hand, but it still fail.

Could someone help to show me how to do it? Thanks.


Cooper


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>