We help IT Professionals succeed at work.

How do I get SSIS Data Flow to put '0.00' in a flat file?

Hello There,

I'm exporting a query result into a Text file usiing SSIS 2008 and I'm having a hard time getting the number on the following format:

190 should be 190.00
0.00 should be 0.00

Right now the text files is showinf the data like this.
190
0

How do I get SSIS Data Flow to put '0.00' in a flat file?

Thanks


Comment
Watch Question

Jim HornSQL Server Data Dude
Most Valuable Expert 2013
Author of the Year 2015

Commented:
The only way to pull this off would be to run your numbers through a function that converts numbers to char/varchar's, with two decimal places.

There is no single SSIS setting to pull this off.

Author

Commented:
Hi

How can I run my numbers through a function that converts numbers to char/varchar's, with two decimal places?

Thanks
Commented:
I was able to do it, using Derived Column

camount1 == ".00" ? "0.00" : (DT_WSTR,18)camount1

Thanks

Author

Commented:
I was able to find a solution