From: zufie on
I am trying to Create a table from DDL code.

Upon running the query I get the error: Syntax error in CREATE TABLE
statement. (Error 3290)

Here is my code after making many changes to it:

CREATE TABLE ACCOUNTABILITY (
OBJECTID number (22) NOT NULL,
OBJECTOWNERID decimal (22),
COMMISOID decimal (22),
RESPONOID decimal (22),
COMMISOBJECTTYPE CHARACTER (5),
RESPONOBJECTTYPE CHARACTER (5),
ACCOUNTYPEOID decimal (22),
BEGINDATE TIMESTAMP,
ENDDATE TIMESTAMP,
OBJECTTYPE CHARACTER (5),
ACL decimal (22),
REPLICNUMBER INTEGER,
ROWLASTCHANGE TIMESTAMP NOT NULL)
;

Any suggestions? I am all ears and eyes.

Zuf
From: John Spencer on
Are you trying to create this table in JET table or an ACE table (the "native"
Access databases?

If so, check out

For a list of the names to use for the field types, see:
Field type names (JET, DDL, DAO and ADOX)
at:
http://allenbrowne.com/ser-49.html

For instance
COMMISOBJECTTYPE Text(5)
BeginDate DateTime
EndDate DateTime

By the way TIMESTAMP is not a date or time field.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

zufie wrote:
> I am trying to Create a table from DDL code.
>
> Upon running the query I get the error: Syntax error in CREATE TABLE
> statement. (Error 3290)
>
> Here is my code after making many changes to it:
>
> CREATE TABLE ACCOUNTABILITY (
> OBJECTID number (22) NOT NULL,
> OBJECTOWNERID decimal (22),
> COMMISOID decimal (22),
> RESPONOID decimal (22),
> COMMISOBJECTTYPE CHARACTER (5),
> RESPONOBJECTTYPE CHARACTER (5),
> ACCOUNTYPEOID decimal (22),
> BEGINDATE TIMESTAMP,
> ENDDATE TIMESTAMP,
> OBJECTTYPE CHARACTER (5),
> ACL decimal (22),
> REPLICNUMBER INTEGER,
> ROWLASTCHANGE TIMESTAMP NOT NULL)
> ;
>
> Any suggestions? I am all ears and eyes.
>
> Zuf
From: Bob Barrows on
zufie wrote:
> I am trying to Create a table from DDL code.
>
> Upon running the query I get the error: Syntax error in CREATE TABLE
> statement. (Error 3290)
>
> Here is my code after making many changes to it:
>
> CREATE TABLE ACCOUNTABILITY (
> OBJECTID number (22) NOT NULL,
> OBJECTOWNERID decimal (22),
> COMMISOID decimal (22),
> RESPONOID decimal (22),
> COMMISOBJECTTYPE CHARACTER (5),
> RESPONOBJECTTYPE CHARACTER (5),
> ACCOUNTYPEOID decimal (22),
> BEGINDATE TIMESTAMP,
> ENDDATE TIMESTAMP,
> OBJECTTYPE CHARACTER (5),
> ACL decimal (22),
> REPLICNUMBER INTEGER,
> ROWLASTCHANGE TIMESTAMP NOT NULL)
> ;
>
> Any suggestions? I am all ears and eyes.
>
> Zuf


"number" and "timestamp" are not valid Jet SQL datatypes. Click F1,
click the link to get you to the table of contents, scroll down to the
Jet SQL Reference node, expand it, then expand Overview and select the
Data Types topic. You'll find you should be using "decimal" and
"datetime" respectively.

--
HTH,
Bob Barrows