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

CREATE TABLE Problem

0 views
Skip to first unread message

Jason

unread,
Mar 4, 2003, 1:10:45 AM3/4/03
to
I am trying to create a table that assigns default values
to columns. It was my understanding that Access 2000 (and
newer) support the DEFAULT keyword.

This is my SQL statement:

CREATE TABLE Holidays (ID COUNTER PRIMARY KEY,
Name TEXT(50) NOT NULL,
Denomination INTEGER DEFAULT 0,
Dte DATETIME)

I am receiving the following error:

[ODBC Microsoft Access Driver] Syntax error in CREATE
TABLE statement.

On a different (but related..kinda) note -- does anyone
know of an add-on or utility that will create CREATE TABLE
statements from EXISTING Access tables.

John Viescas

unread,
Mar 4, 2003, 10:04:27 AM3/4/03
to
Jason-

Attempting Data Definition Language queries in Access is problematic at
best. You're better off creating the table you need in code using DAO or
ADO. As for copying an existing structure, TransferDatabase with the
structure only option should do the trick.

--
John Viescas, author
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
"Jason" <dim...@covad.net> wrote in message
news:008101c2e214$cb66a400$2f01...@phx.gbl...

0 new messages