diff --git a/Microsoft Access/Sample Databases/SalesOrdersExample.accdb b/Microsoft Access/Sample Databases/SalesOrdersExample.accdb new file mode 100644 index 0000000..eb3d84e Binary files /dev/null and b/Microsoft Access/Sample Databases/SalesOrdersExample.accdb differ diff --git a/Microsoft SQL Server/Chapter 04/Listing 4.018.sql b/Microsoft SQL Server/Chapter 04/Listing 4.018.sql index 7d5a22b..8e728a1 100644 --- a/Microsoft SQL Server/Chapter 04/Listing 4.018.sql +++ b/Microsoft SQL Server/Chapter 04/Listing 4.018.sql @@ -17,7 +17,7 @@ GO -- Sample query that searches products correctly: CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads' diff --git a/Microsoft SQL Server/Chapter 04/Listing 4.019.sql b/Microsoft SQL Server/Chapter 04/Listing 4.019.sql index 2b8896c..934ab36 100644 --- a/Microsoft SQL Server/Chapter 04/Listing 4.019.sql +++ b/Microsoft SQL Server/Chapter 04/Listing 4.019.sql @@ -58,7 +58,7 @@ INNER JOIN Products GO CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads' diff --git a/Microsoft SQL Server/Chapter 04/Listing 4.020.sql b/Microsoft SQL Server/Chapter 04/Listing 4.020.sql index cfb9b67..e2eff84 100644 --- a/Microsoft SQL Server/Chapter 04/Listing 4.020.sql +++ b/Microsoft SQL Server/Chapter 04/Listing 4.020.sql @@ -56,7 +56,7 @@ INNER JOIN Products GO CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads' diff --git a/MySQL/Chapter 04/Listing 4.018.sql b/MySQL/Chapter 04/Listing 4.018.sql index da69c4f..b4368a5 100644 --- a/MySQL/Chapter 04/Listing 4.018.sql +++ b/MySQL/Chapter 04/Listing 4.018.sql @@ -15,7 +15,7 @@ DROP VIEW ProdsOfInterest; -- Sample query that searches products correctly: CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads' diff --git a/MySQL/Chapter 04/Listing 4.019.sql b/MySQL/Chapter 04/Listing 4.019.sql index 0d85df5..3127a1e 100644 --- a/MySQL/Chapter 04/Listing 4.019.sql +++ b/MySQL/Chapter 04/Listing 4.019.sql @@ -50,7 +50,7 @@ INNER JOIN Products ON Products.ProductNumber = Order_Details.ProductNumber; CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads' diff --git a/MySQL/Chapter 04/Listing 4.020.sql b/MySQL/Chapter 04/Listing 4.020.sql index e58a2f4..09acccf 100644 --- a/MySQL/Chapter 04/Listing 4.020.sql +++ b/MySQL/Chapter 04/Listing 4.020.sql @@ -48,7 +48,7 @@ INNER JOIN Products ON Products.ProductNumber = Order_Details.ProductNumber; CREATE VIEW ProdsOfInterest AS -SELECT Products.ProductName, +SELECT DISTINCT CASE WHEN Products.ProductName LIKE '%Skateboard%' THEN 'Skateboard' WHEN Products.ProductName LIKE '%Helmet%' THEN 'Helmet' WHEN Products.ProductName LIKE '%Knee Pads%' THEN 'Knee Pads'