General Question
MySQL help!
What am I doing wrong?
CREATE TABLE MARINA
(MARINA_NUM CHAR(4) PRIMARY KEY,
NAME CHAR(20),
ADDRESS CHAR(15),
CITY CHAR(15),
STATE CHAR(2),
ZIP CHAR(5) );
CREATE TABLE OWNER
(OWNER_NUM CHAR(4) PRIMARY KEY,
LAST_NAME CHAR(50),
FIRST_NAME CHAR(20),
ADDRESS CHAR(15),
CITY CHAR(15),
STATE CHAR(2),
ZIP CHAR(5) );
CREATE TABLE MARINA_SLIP
(SLIP_ID DECIMAL(4,0) PRIMARY KEY,
MARINA_NUM CHAR(4),
SLIP_NUM CHAR(4),
LENGTH DECIMAL(4,0),
RENTAL_FEE DECIMAL(8,2),
BOAT_NAME CHAR(50),
BOAT_TYPE CHAR(50),
OWNER_NUM CHAR(4) );
CREATE TABLE SERVICE_CATEGORY
(CATEGORY_NUM DECIMAL(4,0) PRIMARY KEY,
CATEGORY_DESCRIPTION CHAR(255) );
CREATE TABLE SERVICE_REQUEST
(SERVICE_ID DECIMAL(4,0) PRIMARY KEY,
SLIP_ID DECIMAL(4,0),
CATEGORY_NUM DECIMAL(4,0),
DESCRIPTION CHAR(255),
STATUS CHAR(255),
EST_HOURS DECIMAL(4,2),
SPENT_HOURS DECIMAL(4,2),
NEXT_SERVICE_DATE DATE );
INSERT INTO MARINA
VALUES
(‘1’,‘ALEXAMARA EAST’,‘108 2ND AVE’,‘BRINMAN’,‘FL’,‘32273’);
INSERT INTO MARINA
VALUES
(‘2’,‘ALEXAMARA CENTRAL’,‘283 BRANSTON’,‘W. BRINMAN’,‘FL’,‘32274’);
INSERT INTO OWNER
VALUES
(‘AD57’,‘ADNEY’,‘BRUCE AND JEAN’,‘208 CITRUS’,‘BOWTON’,‘FL’,‘31313’);
INSERT INTO OWNER
VALUES
(‘AN75’,‘ANDERSON’,‘BILL’,‘18 WILCOX’,‘GANDER BAY’,‘FL’,‘31044’);
INSERT INTO OWNER
VALUES
(‘BL72’,‘BLAKE’,‘MARY’,‘2672 COMMODORE’,‘BOWTON’,‘FL’,‘31313’);
INSERT INTO OWNER
VALUES
(‘EL25’,‘ELEND’,‘SANDY AND BILL’,‘462 RIVERSIDE’,‘RIVARD’,‘FL’,‘31062’);
INSERT INTO OWNER
VALUES
(‘FE82’,‘FEENSTRA’,‘DANIEL’,‘7822 COVENTRY’,‘KALEVA’,‘FL’,‘32521’);
INSERT INTO OWNER
VALUES
(‘JU92’,‘JUAREZ’,‘MARIA’,‘8922 OAK’,‘RIVARD’,‘FL’,‘31062’);
INSERT INTO OWNER
VALUES
(‘KE22’,‘KELLY’,‘ALYSSA’,‘5271 WATERS’,‘BOWTON’,‘FL’,‘31313’);
INSERT INTO OWNER
VALUES
(‘NO27’,‘NORTON’,‘PETER’,‘2811 LAKEWOOD’,‘LEWISTON’,‘FL’,‘32765’);
INSERT INTO OWNER
VALUES
(‘SM72’,‘SMELTZ’,‘BECKY AND DAVE’,‘922 GARLAND’,‘GLANDER BAY’,‘FL’,‘31044’);
INSERT INTO OWNER
VALUES
(‘TR72’,‘TRENT’,‘ASHTON’,‘922 CREST’,‘BAY SHORES’,‘FL’,‘31062’);
INSERT INTO MARINA_SLIP
VALUES
(‘1’,‘1’,‘A1’,‘40’,‘3800.00’,‘ANDERSON II’,’SPRITE 4000’,’AN75’);
INSERT INTO MARINA_SLIP
VALUES
(‘2’,’1’,’A2’,’40’,’3800.00’,’OUR TOY’,’RAY 4025’,’EL25’);
INSERT INTO MARINA_SLIP
VALUES
(‘3’,’1’,’A3’,’40’,’3600.00’,’ESCAPE’,’SPRITE 4000’,’KE22’);
INSERT INTO MARINA_SLIP
VALUES
(‘4’,’1’,’B1’,’30’,’2400.00’,’GYPSY’,’DOLPHIN 28’,’JU92’);
INSERT INTO MARINA_SLIP
VALUES
(‘5’,’1’,’B2’,’30’,’2600.00’,’ANDERSON III’,’SPRITE 3000’,’AN75’);
INSERT INTO MARINA_SLIP
VALUES
(‘6’,’2’,’1’,’25’,’1800.00’,’BRAVO’,’DOLPHIN 25’,’AD57’);
INSERT INTO MARINA_SLIP
VALUES
(‘7’,’2’,’2’,’25’,’1800.00’,’CHINOOK’,’DOLPHIN 22’,’FE82’);
INSERT INTO MARINA_SLIP
VALUES
(‘8’,’2’,’3’,’25’,’2000.00’,’LISTY’,’DOLPHIN 25’,’SM72’);
INSERT INTO MARINA_SLIP
VALUES
(‘9’,’2’,’4’,’30’,’2500.00’,’MERMAID’,’DOLPHIN 28’,’BL72’);
INSERT INTO MARINA_SLIP
VALUES
(‘10’,’2’,’5’,’40’,’4200.00’,’AXXON II’,’DOLPHIN 40’,’NO27’);
INSERT INTO MARINA_SLIP
VALUES
(‘11’,’2’,’6’,’40’,’4200.00’,’KARVEL’,’RAY 4025’,’TR72’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘1’,’ROUTINE ENGINE MAINTENANCE’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘2’,’ENGINE REPAIR’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘3’,’AIR CONDITIONING’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘4’,’ELECTRICAL SYSTEMS’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘5’,’FIBERGLASS REPAIR’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘6’,’CANVAS INSTALLATION’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘7’,’CANVAS REPAIR’);
INSERT INTO SERVICE_CATEGORY
VALUES
(‘8’,’ELECTRONIC SYSTEMS (RADAR, GPS, AUTOPILOTS, ETC.)’ );
INSERT INTO SERVICE_REQUEST
VALUES
(‘1’,’1’,’3’,’Air conditioner stops with code indicating low coolant level. Diagnose and repair.’,’Technocian has verified the problem. Air conditioning specialist has been called.’,’4’,’2’,’2007–7-12’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘2’,’5’,’4’,’Fuse on port motor blown on two occasions. Diagnose and repair.’,’Open’,’2’,’0’,’2007–7-12’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘3’,’4’,’1’,’Oil change and general routine maintenance (check fluid levels, clean sea strainers, etc.)’,’Service call has been scheduled’,’1’,’0’,’2007–7-16’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘4’,’1’,’2’,’Engine oil level has been dropping off drastically. Diagnose and repair’,’Open’,’2’,’0’,’2007–7-13’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘5’,’3’,’5’,’Open pockets at the base of two stantions.’,’Technician has completed the initial filling of the open pockets. Will complete the job after initial fill has had sufficient time to dry.’,’4’,’2’,’2007–7-13’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘6’,’11’,’4’,’Electronic-flush system periodically stops functioning. Diagnose and repair.’,’Open’,’3’,’0’,‘2010–12-31’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘7’,’6’,’2’,’Engine overheating. Loss of coolant. Diagnose and repair.’,’Open’,’2’,’0’,’2007–7-13’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘8’,’6’,’2’,’Heater exchanger not operating correctly’,’Technician has determined that the exchanger is faulty. New exchanger has been ordered.’,’4’,’1’,’2007–7-17’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘9’,’7’,’6’,’Canvas severely damaged in windstorm. Order and install new canvas’,’Open’,’8’,’0’,’2007–7-16’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘10’,’2’,’8’,’Install new GPS and chart plotter’,’Scheduled’,’7’,’0’,’2007–7-12’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘11’,’2’,’3’,’Air conditioning unit shuts down with HHH showing on the control panel’,’Technician not able to replicate the problem. Air conditioning unit ran fine through multiple tests. Owners to notify the technician if the problems recurs.’,’1’,’1’,‘2010–12-31’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘12’,’4’,’8’,’Both speed and depth readings on data are significantly less then the owner thinks it should be’,’Technician has scheduled appointment with owner to attempt to verify the problem’,’2’,’0’,’2007–7-16’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘13’,’8’,’2’,’Customer describes engine as making a clattering sound’,’Technician suspects problem with either propellar or shaft and has scheduled the boat to be pulled from the water for further investigation’,’5’,’2’,’2007–7-12’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘14’,’7’,’5’,’Owner accidnet caused damage to forward portion of port side’,’Technician has scheduled repair’,’6’,’0’,’2007–7-13’);
INSERT INTO SERVICE_REQUEST
VALUES
(‘15’,’11’,’7’,’Canvas leaks around zippers in heavy rain. Install overlap around zippers to prevent leaks’,’Overlap has been created. Installation has been scheduled’,’8’,’3’,’2007–7-17’);
Query OK, 0 rows affected (0.10 sec)
Query OK, 0 rows affected (0.10 sec)
Query OK, 0 rows affected (0.07 sec)
Query OK, 0 rows affected (0.09 sec)
Query OK, 0 rows affected (0.07 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.04 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.04 sec)
Query OK, 1 row affected (0.04 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.04 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.03 sec)
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 ‘2010-
12–31’);
INSERT INTO SERVICE_REQUEST
VALUES
(æ7Æ,Æ6Æ,Æ2Æ,ÆEngine overheatin’ at line 3
mysql>
9 Answers
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.