Results 1 to 7 of 7
  1. #1
    HAREM is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Apr 2019
    Posts
    4

    Unhappy cannot find table or constraint

    Create table costumer
    (costumer_id int primary key,
    first_name char(100) null,
    last_name char(100)not null,
    email char(100) not null,
    address char(100) not null,
    city char(100) not null,


    state char(100) not null,
    zipcode number not null);

    INSERT INTO COSTUMER
    VALUES (1, 'George', 'Wali', 'jw@email.com', 'FB area', 'Karachi', 'PK', '2211');





    create table orders(order_id int primary key,
    amount int,
    costumer_id int,
    foreign key(costumer_id) references costumers(costumer_id));

    after running second table the error message occurs...

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Code:
    create table orders(order_id int primary key, amount int, costumer_id int, foreign key(costumer_id) references costumers(costumer_id));
    Spelling error
    Last edited by davegri; 04-06-2019 at 06:24 AM. Reason: format

  3. #3
    HAREM is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Apr 2019
    Posts
    4
    where is spelling error?

  4. #4
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Quote Originally Posted by HAREM View Post
    where is spelling error?
    table name is costumer not costumers

  5. #5
    HAREM is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Apr 2019
    Posts
    4
    Relationship must be on the same number of fields with the same data types. this error comes in


  6. #6
    HAREM is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Apr 2019
    Posts
    4
    Select first_name, last_name, amount
    from costumer as d inner join orders as o on d.customer_id=o.customer_id;

  7. #7
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Quote Originally Posted by HAREM View Post
    Select first_name, last_name, amount
    from costumer as d inner join orders as o on d.customer_id=o.customer_id;
    Let's get some consistency here. Is it Costumer or Customer? Let's not have both!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cannot find Table or Constraint
    By Lowet50 in forum Access
    Replies: 3
    Last Post: 03-27-2015, 02:24 PM
  2. Using Constraint statement in SQL
    By shani20 in forum Programming
    Replies: 3
    Last Post: 01-27-2015, 09:48 PM
  3. Replies: 5
    Last Post: 09-29-2014, 07:43 PM
  4. Access SQL Syntax For Creating a Table With a Default Constraint
    By crystalclear in forum Database Design
    Replies: 3
    Last Post: 09-22-2013, 02:24 AM
  5. How do I display SQL constraint errors?
    By isabelle2378 in forum Forms
    Replies: 3
    Last Post: 10-19-2010, 03:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums