Still encountering problems. I can enter data for all tables except "Usage" where I get an error relating to foreign keys.
My SQL created code is below:
SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET...
Sorry, wasn't very clear last time.
The problem foreign key is "dateofvisit" in table "usage".
"dateofvisit" is a primary key, along with a number of others in table "visit".
I get MySQL Error 1072
Key column " doesn't exist in table
I think it's trying to pull in the other primary key...
I think i've just found that out. I can't get the last table (Usage) to be created because the primary keys are also foreign keys from other tables.
I can enter 'client' in this table as a foreign key, but not the others. It just throws up an error and / or crashes MySQL Administrator.
I'm...
I'm VERY new to SQL and would really like some assistance in setting up a database.
My ER diagram is here:
www.alchemistresearch.com/diagram.jpg
I began to enter SQL into Microsoft Access but had quite a few problems. My code is listed below. I'm not sure if it's 100% correct, I imagine that...
Hi again,
Sorry for the delay in replying, I've had a break from the project.
GingerR - I was aware that the order of the fields was wrong. I had made the changes but not altered the uploaded file, but still had problems.
I'm wondering if I should start again from scratch. My original ER...
I'm back!
I'm now having trouble using SQL to enter data into the table "Usage". The error message I get is a "type conversion failure".
The data I am enetering is:
INSERT INTO Usage VALUES (1,"11/12/04","15:00","16:00",1)
I've tried putting the data into different orders to no avail.
Thanks, that worked perfectly! I have never created a 'composite key' before, only simple primary and foreign ones.
Looking at my ER diagram now, I can clearly see where the problem was. I am forever in your debt!
I'm glad it's not me. A colleague has also had the same problem.
The only problem I have now is that Access says that table "Usage" already exists after setting up a command to create "Usage" with no keys like you said. Would I need to alter the second create to ALTER?
I'm writing a small database but am having problems with creating the last table. I've uploaded my DB here:
http://www.alchemistresearch.com/0306483.mdb
and am creating the tables in the following order:
FacilityType
Client
Visit
Equipment
Assessment
Usage
It's when I'm creating the Usage...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.