|
|
Question : Export Access Table into DBF, Decimal Problem
|
|
I am exporting an Access table into a dbf file. All of my numerical fields are defaulting to 5 decimal places, no matter what the access setting. I need to decrease this to 2 decimals for some, 3 decimals for some, and none for others.
|
Answer : Export Access Table into DBF, Decimal Problem
|
|
Use the format function in the sql of your export query. Assuming fields "field0, field2, field3" from table "table1"
SELECT Format(table1.Field0),"#") AS Field0, Format(table1.Field2),"#.00") AS Field2, Format(table1.Field3),"#.000") AS Field3
FROM table1
If your export is a join of tables etc just modify the statement accordingly
|
|
|
|
|