Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta

SQL in ACCESS watch

Announcements
    • Thread Starter
    Offline

    0
    ReputationRep:
    I am implementing the following tables in SQL...

    CREATE TABLE Member(
    MemberID AUTOINCREMENT PRIMARY KEY,
    Title TEXT (4) NOT NULL,
    Forename TEXT (20) NOT NULL,
    Surname TEXT (20) NOT NULL,
    HouseNo TEXT (20) NOT NULL,
    Postcode TEXT (6) NOT NULL,
    TelNo TEXT (6) NOT NULL);

    CREATE TABLE Meeting(
    MeetingID AUTOINCREMENT PRIMARY KEY,
    TheDate DATE NOT NULL,
    Venue TEXT (20) NOT NULL,
    Minutes OLEOBJECT NOT NULL);

    CREATE TABLE MemberMeeting(
    MemberID INT NOT NULL REFERENCES Member (MemberID),
    MeetingID INT NOT NULL REFERENCES Meeting (MeetingID));

    I then try to implement...

    CREATE TABLE Transaction(
    TransactionID AUTOINCREMENT PRIMARY KEY,
    MeetingID INT NOT NULL REFERENCES Meeting (MeetingID),
    ShareID INT NOT NULL,
    SharePrice CURRENCY NOT NULL,
    Quantity NUMBER NOT NULL,
    TotalPrice NUMBER NOT NULL,
    TheDate DATE NOT NULL REFERENCES Meeting (TheDate));

    But am faced with this error: "no unique index found for the referenced field of the primary table" - can anyone see anything in the structure that might be culpable?
 
 
 
Reply
Submit reply
Turn on thread page Beta
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: April 9, 2006
Poll
Do you agree with the proposed ban on plastic straws and cotton buds?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.