Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CREATE TABLE statement with Decimal field

3 views
Skip to first unread message

Allen

unread,
Dec 6, 2005, 12:37:21 PM12/6/05
to

--------------------------------------------------------------------------------

What is the syntax for creating a Decimal field using the CREATE TABLE
statement? For example, this works for a Double field:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DOUBLE)"

But this does not work for a Decimal field:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DECIMAL)"

Neither does this work:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DECIMAL(10,2))"


--
Allen
------------------------------------------------------------------------
Allen's Profile: http://www.highdots.com/forums/m1145
View this thread: http://www.highdots.com/forums/t3133006

George Nicholson

unread,
Dec 6, 2005, 2:36:43 PM12/6/05
to
http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
Description of the new features that are included in Microsoft Jet 4.0

Under "A new Microsoft Jet 4.0 data type":
"Decimal data types are new to Microsoft Jet 4.0. ....Supported synonyms are
Dec and Numeric....
This data type is not supported via Data Access Objects (DAO). It is
supported only with ActiveX Data Objects (ADO). "

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Allen" <Allen....@no-mx.forums.yourdomain.com.au> wrote in message
news:Allen....@no-mx.forums.yourdomain.com.au...

MGFoster

unread,
Dec 8, 2005, 1:31:22 AM12/8/05
to
Access 2002 and higher.

If you can, put your DB in ANSI-92 compatible syntax.

How:
With the focus on the Database window, on the main menu select: Tools >
Options > Tables/Queries tab > SQL Server Compatible Syntax (ANSI-92) -
check "This Database."

Then you can use DAO and DDL statements to create a table w/ a Decimal
data type.

Warning: The use of wildcards will change to % in place of * and to _
in place of ?.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

0 new messages