change data type from decimal to double

B

Bongard

I have a linked table in which I can't change the data types and the
amount field is a decimal data type. From that table I combine some
other fields from other tables with a make table query. Ultimately I
run a crosstab that gives me the message (Decimal data type doesn't
have enough precision) or something like that. I can then go manually
into my make table and change the data type to double everytime I run
it but I would like this to happen automatically. Could I change the
data type from decimal-double using an append or an update query
somehow?

Thanks for your help!
Brian
 
J

Jeff Boyce

Brian

If you are using a "make table" each time you do this, consider doing the
following instead:

Create the new table once. Modify the data types as needed.

Now, every time you would have used "Make Table", instead first delete all
the records from that table, then append all the new records, doing any data
type conversion needed.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

Marshall Barton

Bongard said:
I have a linked table in which I can't change the data types and the
amount field is a decimal data type. From that table I combine some
other fields from other tables with a make table query. Ultimately I
run a crosstab that gives me the message (Decimal data type doesn't
have enough precision) or something like that. I can then go manually
into my make table and change the data type to double everytime I run
it but I would like this to happen automatically. Could I change the
data type from decimal-double using an append or an update query
somehow?


Just use the CDbl function in your make table query.
Something along these lines:

INSERT INTO sometable
SELECT f1, f2, CDbl(decimalfield)
FROM linkedtable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top