Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 2nd, 2003, 12:45 PM
Trail Trail is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 Trail User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
New to creating Access Queries in SQL

I'd like to write one script for a Query in Microsoft Access but it won't allow me to use multiple CREATE TABLE commands. It would be great if someone new a good site for beginners using SQL with Microsoft Access. Below is my code.

It rejects the code that is in red because the syntax is incorrect.

CREATE TABLE PROJECT (
ProjectID Integer Primary Key,
Name Char(25) Not Null,
Department VarChar(100) Null,
MaxHours Numeric(5,2));


CREATE TABLE EMPLOYEE(
EmployeeNumber Integer NotNull,
Name Char(25) Not Null,
Phone Char(8)
Department VarChar(100));
ALTER TABLE EMPLOYEE
ADD CONTRAINT EmployeePK PRIMARY KEY (EmployeeNumber);

I believe that this may work for Oracle but I need to know how to modify it so it works in access.

Reply With Quote
  #2  
Old December 2nd, 2003, 12:48 PM
Trail Trail is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 Trail User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It is for Access XP

Reply With Quote
  #3  
Old December 3rd, 2003, 06:29 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
Access data types are also different

use number for integer
use text for varchar/char
use memo for text
use autonumber for identity


See:
http://www.aspfaq.com/show.asp?id=2214

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > New to creating Access Queries in SQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway