Quiz 3&4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Major Quiz#03 & #04

1. Use HomeMart Database


2. Modify Product table by adding 1 col named “Discount_Promo” as float with default value to Zero.

3. Create a stored procedure to take “10%” Rate as input value for the “Discount_Promo” in the
Product Table, provided that the StockOnHand is more than 90% of the MaxStock.
Note: Include initialization of Discount_Promo field to Zero. See Exhibit “A” for sample output

4. Create and run another Stored Procedure/s to supply values for Disc_Amount, Percent_Disc and
Net_Amount whose values are NULL in SalesOrderHeader Table.
Note: Since CustID of these null values does not exist in the Customer Table, use Product Table
instead to recalculate the values.
All “null” values should be transformed
as shown in Exhibit “B” ---------------->

Exhibit “A” Exhibit “B”

You might also like