Chapter 10C – Managing Databases with MySQL 5.7
Marcia’s Dry Cleaning tracks which employees have worked on specific dry cleaning
jobs. This is somewhat complicated by the fact that more than one employee may have
helped a customer with a particular order. So far, the company has kept their insurance
Solutions to the SQL parts are below and in the file MDC-Import-Excel-Data.sql.
X. Duplicate the EMPLOYEE worksheet in Figure 10C-109 in a worksheet (or spreadsheet)
in Microsoft Excel 2016 (or another tool such as Apache OpenOffice Calc).
See the file DBP-e15-MDC-Employee.xlsx in both the student and instructor resource centers.
Y. Import the data in the EMPLOYEE worksheet into a new table in the MDC database
named EMPLOYEE_TEMP. Hint: Use the MySQL for Excel Add-In, which exports the
data from Microsoft Excel to MySQL.
Follow the instructions on pages 10C-62 to 10C-67 to complete this task. Be careful to be
Z. Create the GetLastNameCommaSeparated user-defined function shown in Figure 10C-
60.
DELIMITER //
CREATE FUNCTION GetLastNameCommaSeparated
— These are the input parameters
(
varName VARCHAR(25)
)
RETURNS VARCHAR(25) DETERMINISTIC
BEGIN
END
//
DELIMITER ;