Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (14 loc) · 1.46 KB

lab3.md

File metadata and controls

27 lines (14 loc) · 1.46 KB

Lab 3 help

Fixing a query

If you find that the GROUP BY clause is lost, make sure to explicitly require that it is retained (along with the ORDER BY) in your prompt.

You'll find a final solution (which may differ from yours) in the lab3-fixedquery-solution.sql.

Modifying the Customer table

The solution to this may vary based on your selected database server. Not all servers provide a case insensitive text type. Where it isn't supported, create a VARCHAR(254) field instead.

For PostgreSQL if you are trying to use the CITEXT extension type, you may need to install the extension first. For Azure Database for PostgreSQL you can do this by following the process listed on Microsoft Learn.

You'll find a final solution (which may differ from yours) in the lab3-newfield-solution.sql.

Fixing a stored procedure

This lab step is a bit involved, but it is possible to get GitHub Copilot to generate the SQL to fix the stored procedure. You will need to add a check to ensure the EmailAddress field is a valid email address and that the CustomerID exists in the Customer table.

You may need to introduce the fixes using individual prompts.

You'll find a final solution (which may differ from yours) in the lab3-fixedsproc-solution.sql.


Home