assignment 9 12

Q1 Add a new row in the ORDERS table with the following data: Order# is 2222, customer# is 2121, and the order date is January 22, 2016. Describe the error raised and explain what causes this error. Write another query with a change that allows it to succeed. You may use any valid data.

Q2 Create a script using substitutions variables that allow the user to set a new retail price for a book based on ISBN. NOTE: Important information regarding substitution variables in this week’s supplemental materials.Run your script for the following values ISBN = 1059831198 and retail = $99.99

Q3 Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 letters of the last name and the first letter of the first name, they should be able to get the right author. Ask the user to input a percentage and calculate the new discounted price based on the current retail price minus this percentage. Round the result to cents (two decimals). For your example query, assume the user wants to discount the price of James Patterson books by 20%. Please, check your lab work for Chapter 10. We covered a similar query but without the use of substitution variables.

Please, check your lab work for Chapter 10. We covered a similar query but without the use of substitution variables. I posted the partial query in this week’s Discussion Board.

Q4 Question 5 on page 177

(I deleted old Q5 here because it was a duplicate of Q2)

Q5 Question 9 on page 177

Attach and submit your completed assignments in RTF, TXT or SQL format. Please do not include any results from your queries.

ONLY submit the SQL scripts using the following naming convention: HW#_Q#_YourInitials.

For example:

HW9_Q1_DV