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

Need help reading negative number from flat file source

$
0
0

Hi All,

I have a flat file source that contains a negative sign in the value and need to know how to read it in and get the correct value for output.

Example, 0000000000-2000 should be outputted as -20.00

The column is defined as 16,2 in the data dictionary. If this were a true number (no signs), I could use the following expression in Derived Column:

ISNULL(TP_PAYMNT_AMT) ? 0 : TP_PAYMNT_AMT / 1000

But this doesn't work. I have the column defined in flat file connection as numeric 18,0.

How do I define the column in flat file connection and what expression do I need to get the desired result (-20.00)? How should the column be defined in my SQL table to handle signed fields?

Thanks for your help.

Dave


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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