Changing Double to Decimal

J

jabah_cum_jiriumum

Hi,
I'd like to modify a Column in a table that is setted as Double into Decimal
with 4 places.
I try the command ALTER TABLE tab_final ALTER COLUMN txt DECIMAL (15,2) but
it didn't work. Is there some way to do it.
Thanks.
 
K

KARL DEWEY

Open the table in design view, click on the field, at the bottom change the
Field Size and number of decimal places. Save.
 
A

Allen Browne

As Karl says, it is very easy to do in the table design interface.

It is also possible if you execute your DDL query statement under ADO:
CurrentProject.Connection.Execute strSql

I didn't understand why the 2nd argument is a 2 when you want 4 places.

You should also know that the Decimal field type is very poorly implemented
in Access. Even basic sorting fails. More info:
http://allenbrowne.com/bug-08.html
 
J

jabah_cum_jiriumum via AccessMonster.com

Oh Thanks!!!
Using ADO I got my column as Decimal!!!
( Really, my 2nd argument was wrong when I wrote here.)

This is the right query that worked under ADO modifying the Column setted as
Double into Decimal with 4 places:
CurrentProject.Connection.Execute ("ALTER TABLE tab_final ALTER COLUMN txt
DECIMAL (15,4)")


Allen said:
As Karl says, it is very easy to do in the table design interface.

It is also possible if you execute your DDL query statement under ADO:
CurrentProject.Connection.Execute strSql

I didn't understand why the 2nd argument is a 2 when you want 4 places.

You should also know that the Decimal field type is very poorly implemented
in Access. Even basic sorting fails. More info:
http://allenbrowne.com/bug-08.html
Open the table in design view, click on the field, at the bottom change
the
[quoted text clipped - 8 lines]
 

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