Reputation: 3070
I have a local table and a query in MS Access application. Query populates the table with values, and the table has a column whose return type value should be double, i set the Field Size as Double, but on running the application, it automatically changes the Field Size for that column to Decimal with upto 2 Decimal places. I don't want that column to have round off values.
For Instance: A value 12.44556 is output as 12.44.
How can i enforce Access to use Double as Field Size ? Access at the moment, overrides the Field Size that i set.
Any Ideas, i am kinda lost ?
I have a very straight forward SQL.
SELECT A,B,C,D
INTO TABLE_TEST
FROM TESTABC
Where TABLE_TEST is a local table, and TESTABC is SQL db table.
Also, after this i am updating the column, with certain multiplications like the following.
Update TABLE_TEST
SET B= A/C*D
A,B,C and D all should have Field Size as Double, Even when i set it as Double, on running, Access changes it back to Decimal. :\
Upvotes: 1
Views: 1203
Reputation: 180808
SELECT INTO creates a new table. If you want to add records to an existing table (with predefined data types), you should use an APPEND query.
Upvotes: 3
Reputation: 91366
The properties should be like so:
Resulting in:
To create this from a query, you can use, something on the lines of:
SELECT Table1.AText, CDbl([ANumeric]/2) AS Expr1 INTO b
FROM Table1;
CDbl
will ensure you get a double returned.
Upvotes: 3