WeeZaliban
New Member
- Joined
- Jul 26, 2013
- Messages
- 16
I have been trying to build a SELECT query to drop data from multiple tables into one in order to easily build a report off of that table. I am only focusing on one table at a time and have run into an issue with an INSERT INTO statement.
For one of the fields in the destination table which is formatted as a Long Integer, it loses the numbers after the decimal point. However, the number is accurate when I look at the Datasheet View of the Query before running it as a whole so the issue doesn't appear to be in the SELECT statement.
Example:
Table1.OldField5
83.05
Table2.NewField5
83
Even after tampering with the Format of that Field (making it Fixed, changing Decimal Places to '2'), it is still 83.00.
Below is what I have now and just to be clear, all other data comes through fine. It is only that field that does not accurately carry over the correct values after the decimal point.
INSERT INTO Table2 ( [NewField1], [NewField2], [NewField3], [NewField4], [NewField5], [NewField6], [NewField7], [NewField8] )
SELECT OldField1 As NewField1, OldField2 As NewField2 etc...
FROM Table1
WHERE OldField1 = 'Criteria1' AND OldField10 = 'Criteria2'
GROUP BY OldField1, OldField2, OldField3, OldField4
Any help is greatly appreciated.
For one of the fields in the destination table which is formatted as a Long Integer, it loses the numbers after the decimal point. However, the number is accurate when I look at the Datasheet View of the Query before running it as a whole so the issue doesn't appear to be in the SELECT statement.
Example:
Table1.OldField5
83.05
Table2.NewField5
83
Even after tampering with the Format of that Field (making it Fixed, changing Decimal Places to '2'), it is still 83.00.
Below is what I have now and just to be clear, all other data comes through fine. It is only that field that does not accurately carry over the correct values after the decimal point.
INSERT INTO Table2 ( [NewField1], [NewField2], [NewField3], [NewField4], [NewField5], [NewField6], [NewField7], [NewField8] )
SELECT OldField1 As NewField1, OldField2 As NewField2 etc...
FROM Table1
WHERE OldField1 = 'Criteria1' AND OldField10 = 'Criteria2'
GROUP BY OldField1, OldField2, OldField3, OldField4
Any help is greatly appreciated.