bustersports
Programmer
Hi,
Thanks for looking at my question.
I am importing a spreadsheet into my database that is all text. The import is checked for accuracy and field requirements (not every instance requires the same fields being completed). Part of the check is to verify the total dollar amount is correct in that all 12 possible fields for dollar values equal the total billed amount. The problem is when the spreadsheet is imported, dollar values changed to a number field (I have tried single, long, and double) format with currency (tried without as well), decimal places = 2, the totals are not matching after the field type is changed. Even when they are do total correctly when still in a text format. Below is an example of what is happening.
Original Spreadsheet
Item Amount1 Amount2 Amount3 Total Billed
a 1113.74 6815.89 7929.63 (note that it is common to not have a value in each Amount field)
After import
Item Amount1 Amount2 Amount3 Total Billed
a 1113.73999023438 6815.89013671875 7929.6298828125
What I need to have is nothing past 2 decimal places and the total should match up, in other words it should be exact as the import.
When errors are detected the processing stops and the user is notified to reject the file. Obviously, this is creating a problem by rejecting them when they are correct.
After the error checks are done on each field, the file is exported back into a text file. This is working fine.
Not sure what is causing this problem. Any ideas?
Thanks
Thanks for looking at my question.
I am importing a spreadsheet into my database that is all text. The import is checked for accuracy and field requirements (not every instance requires the same fields being completed). Part of the check is to verify the total dollar amount is correct in that all 12 possible fields for dollar values equal the total billed amount. The problem is when the spreadsheet is imported, dollar values changed to a number field (I have tried single, long, and double) format with currency (tried without as well), decimal places = 2, the totals are not matching after the field type is changed. Even when they are do total correctly when still in a text format. Below is an example of what is happening.
Original Spreadsheet
Item Amount1 Amount2 Amount3 Total Billed
a 1113.74 6815.89 7929.63 (note that it is common to not have a value in each Amount field)
After import
Item Amount1 Amount2 Amount3 Total Billed
a 1113.73999023438 6815.89013671875 7929.6298828125
What I need to have is nothing past 2 decimal places and the total should match up, in other words it should be exact as the import.
When errors are detected the processing stops and the user is notified to reject the file. Obviously, this is creating a problem by rejecting them when they are correct.
After the error checks are done on each field, the file is exported back into a text file. This is working fine.
Not sure what is causing this problem. Any ideas?
Thanks