Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 8th, 2005, 12:14 AM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create table statement syntax error in access 2000

Hi guys i tried to run this create table statement and each time i get syntax error.
 I pasted the code in sql view windows of access 2000 and pressed the run code and i get
 this error massage saying there is syntax error. Could any one help me write correct
 create table statement that does not give me this error.I know u might tell me why u
 do not create table in design view or .. but i want to do this since i want learn this
method as well.thanks


Code:
CREATE TABLE PLAYERS
(PLAYERNO SMALLINT NOT NULL  CHECK (PLAYERNO >0),
NAME CHAR(25) NOT NULL ,
INITIALS CHAR(5) NOT NULL ,
BIRTH_DATE DATETIME,
************ CHAR(1) NOT NULL ,
JOINED SMALLINT CHECK (JOINED >=1980),
STREET CHAR(15) NOT NULL ,
HOUSENO CHAR(4),
POSTCODE CHAR(6),
TOWN CHAR(10) NOT NULL ,
PHONENO CHAR(10),
LEAGUENO CHAR(4),
PRIMARY KEY (PLAYERNO)
)
  #2 (permalink)  
Old August 8th, 2005, 02:10 AM
Friend of Wrox
 
Join Date: Jul 2005
Location: Oklahoma City, OK, USA.
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

AccessSQL does not support:

 CHECK (JOINED >=1980)

YOu will need to use a different method to do this. I use DAO since that is what Access uses itself.




Boyd
Access Based Accounting/Business Solutions developer.


Similar Threads
Thread Thread Starter Forum Replies Last Post
CREATE TABLE syntax error RaCheer SQL Language 1 January 29th, 2006 01:46 AM
What is the syntax of create table and insert stat method Access 1 June 27th, 2005 02:29 PM
$sql="CREATE TABLE syntax error cedtech23 Beginning PHP 3 August 24th, 2004 04:56 AM
Syntax error in INSERT INTO statement remnatch Access ASP 9 July 8th, 2004 12:09 PM
Syntax error in INSERT INTO statement. askaggs Classic ASP Databases 5 June 10th, 2004 12:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.