Jump to content

Ruth

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by Ruth

  1. I took out the constraint pk_placement. I changed the data type for pay to money. Now I'm getting the following error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' start_date datetime, pay money, primary key (pclient_id, pagent_id, plog, pemp_' at line 5 As far as I can see the date data type is correct I'm not sure about money. But it still throws the error regardless.
  2. I'm using mysql 5.1 I have four tables, I'm trying to use the fifth to link them together. I have a client, agency, phone log, and employers table that is created. I'm getting the following error when I try to create my link table placement: ERROR 1005 (HY000): Can't create table './netpro/placement.frm' (errno: 150) Here is my create table statement: create table placement ( pclient_id int, pagent_id char(20), plog int, pemp_id int, start_date date, pay int, constraint pk_placement primary key (pclient_id, pagent_id, plog, pemp_id), constraint fk_pclient foreign key (pclient_id) references client on update cascade on delete cascade, constraint fk_pagent foreign key (pagent_id) references agency on update cascade on delete cascade, constraint fk_plog foreign key (plog) references phone_log on update cascade on delete cascade, constraint fk_pempid foreign key (pemp_id) references employers on update cascade on delete cascade ) engine = innodb;
  3. I'm using sql 5.1 running on unix. I have four tables I'm trying to link together through one table. I have a client, agency, phone log and employers table already built. When I try to create my placement table (link table) I get the following error: ERROR 1005 (HY000): Can't create table './netpro/placement.frm' (errno: 150) Here is my create table statement: create table placement ( pclient_id int, pagent_id char(20), plog int, pemp_id int, start_date date, pay int, constraint pk_placement primary key (pclient_id, pagent_id, plog, pemp_id), constraint fk_pclient foreign key (pclient_id) references client on update cascade on delete cascade, constraint fk_pagent foreign key (pagent_id) references agency on update cascade on delete cascade, constraint fk_plog foreign key (plog) references phone_log on update cascade on delete cascade, constraint fk_pempid foreign key (pemp_id) references employers on update cascade on delete cascade ) engine = innodb; can anyone help me
  4. Ok guys I can't figure this one out. I'm am trying to restore a database. I've created the database and then tired to restore my backup file. Here is my syntax: restore database NorthwindReportData from disk = 'G:\Program Files\Microsoft SQL Server\MSSQL\Backup\NorthwindReportData_FullBackup./BAK' with norecovery, move = 'NWRD_Data' to 'G:\Program Files\Microsoft SQL Server\MSSQL\Data\NorthwindReportData.mdf', move = 'NWRDLog' to 'D:\sql_logs\NWRDLog.ldf' I keep getting the error: Server: Msg 156, Level 15, State 1, Line 4 Incorrect syntax near the keyword 'to' I know the medianame and mediapassword or optional, so what am I doing wrong? R
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.