Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading from database vs text file (rounding)

I'm seeing some weird behavior when loading from a text file vs directly from the database.  My test is database -> text file -> QV vs. database -> QV.  When loading from the db, the amount fields appear to be rounding.  For example:

Text file row:

"|"20130611"|"180200"|"-1"|"435166"|"34"|"-1_20130611"|"UNKNOWN"|"ZAF"|"-6112.9157"

QV value when loading from text file:  -6112.9157

QV value when loading directly from the db:  -6112.92

The SQL for loading the txt file is exactly the same as what's used to load QV directly (just a select * with a where clause).  Any idea what this behavior could be related to?

Thanks,

Justin

UPDATE:  If i change the SQL within QV to "cast(amt as varchar(20)) as amt" then it shows up with 4 decimal places and doesn't round.  Could this be an issue with the ODBC driver rounding on the way in?

0 Replies