Question
UPDATE EMPLOYEE SET Employee.EndDate = `2017-05-12` WHERE Employee.EmployeeID =`9378`; Error Code: 1054. Unknown column '9378' in 'where clause' I need to complete all the following
UPDATE EMPLOYEE SET Employee.EndDate = `2017-05-12` WHERE Employee.EmployeeID =`9378`;
Error Code: 1054. Unknown column '9378' in 'where clause'
I need to complete all the following steps below. Please help ME! This are my table I created.
CREATE TABLE `Employee`( `EmployeeID` INT NOT NULL, `First_Name` VARCHAR(45) NOT NULL, `LastName` VARCHAR(45) NOT NULL, `StartDate` DATE NOT NULL, `EndDate` DATE, `HourlyWage` DECIMAL(10,2) NOT NULL, `HoursWorked` INT, `IsPayroll` TINYINT NOT NULL, PRIMARY KEY (`EmployeeID`));
CREATE TABLE `Maintenance_Log`( `ApplianceID` INT NOT NULL, `ApplianceName` VARCHAR(45) NOT NULL, `ServiceBy`INT NOT NULL, `LastServiceDate` DATE NOT NULL, `NextServiceDate` DATE, PRIMARY KEY (`ApplianceID`), CONSTRAINT `ServiceBy` FOREIGN KEY (`ServiceBy`) REFERENCES `Employee`(`EmployeeID`) );
CREATE TABLE `MenuItemPrep`( `BatchID` INT NOT NULL, `Name` VARCHAR(45) NOT NULL, `Flavor` VARCHAR(45) NOT NULL, `Count` INT NOT NULL, `ExpirationDate` DATE NOT NULL, `PreparedBy` INT NOT NULL, PRIMARY KEY (`BatchID`), CONSTRAINT `PreparedBy` FOREIGN KEY (`PreparedBy`) REFERENCES `Employee`(`EmployeeID`) );
This is my insert to
INSERT INTO Employee (EmployeeID, First_Name, LastName, StartDate, EndDate, HourlyWage, HoursWorked, IsPayroll) VALUES (9378, 'Joshua', 'Price', '2015-10-12', NULL, 25.00, 40, 0), (9379, 'Tasha', 'Brown', '2018-08-09', NULL, 20.00, 40, 1), (9380, 'Jaime', 'Davis', '2020-11-05', '2021-01-01', 16.00, 0, 0), (9381, 'Jimmy', 'Brown', '2021-06-26', NULL, 11.00, 15, 0);
INSERT INTO Maintenance_Log (ApplianceID, ApplianceName, ServiceBy, LastServiceDate, NextServiceDate ) VALUES (2005, 'Barista Machine', 9378, '2021-08-06', '2021-08-06'), (2006, 'Hot Water Dispenser', 9380, '2020-12-31', '2022-12-31'), (2007, 'Blender Machine', 9381, '2019-05-21', '2019-05-21');
INSERT INTO MenuItemPrep (BatchID, Name, Flavor, Count, ExpirationDate, PreparedBy) VALUES (7578, 'Iced Coffee', 'Caramel', 10, '2019-03-11', 9378), (7579, 'Chocolate Syrup', 'Chocolate', 20, '2020-05-17', 9378), (7580, 'Hot Coffee', 'Mocha', 10, '2021-10-21', 9381), (7581, 'Pastry', 'Almond', 5, '2022-12-19', 9378);
Unfortunately, after John's long years of service, the coffee shop needs to part in a different direction. UPDATE Employee SET Employee. EndDate =202231 WHERE Employee. EmployeeID =3378; It's a week later and the blender is unexpectedly broken. It's time to pull out the tools and service it. Although they're short staffed, Margie is able to piece a hot fix together which earns her a raisel She's working more hours too. The blender isn't completely fixed but she schedules and updates the next service date for a few days out for breathing room until they onboard a new employee to help out. (Since John no longer is working, his hours worked for the week needs to be adjusted). Everyone else is on overtime since they're stretched thin. UPDATE Employee SET Employee. Hoursworked =0 WHERE Employee. EmployeeID = ' 3378; UPDATE Employee SET Employee. Hoursworked =45, Employee. Hourlywage =22.50 WHERE Employee. EmployeeID = ' 3381 '; UPDATE Employee SET Employee. Hoursworked =45 WHERE Employee. EmployeeID = ' 3379 '; Margie should be able to stay on top of the blender maintenance now that she recorded it. Update Maintenance_Log SET Maintenance_Log.LastServiceDate = '2022-03-08', Maintenance_Log.NextServiceDate = ' 20229311 ' WHERE Maintenance_Log.ApplianceName = 'Blender'; A week later and they onboarded a new barista! He's excited to work with the team and the happy they don't have their plates full and they're working normal hours now. INSERT INTO 'Employee' ( EmployeeID', 'FirstName', 'LastName', 'StartDate', 'EndDate', 'HourlyWage', 'Hoursworked', 'IsPayrol1') VALUE ' 'Shia', 'Arton', '2022-03-14', NULL, 16.00, '10', '); UPDATE Employee SET Employee. Hoursworked =40 WHERE Employee. EmployeeID = ' 3379 '; UPDATE Employee SET Employee. HoursWorked =40 WHERE Employee. EmployeeID = ' 3381 '; A few months in the future
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started