If the value for the listprice column is a negative number

Assignment Help PL-SQL Programming
Reference no: EM13166176

Write a script that creates and calls a stored procedure named spInsertProduct that inserts a row into the Products table. This stored procedure should accept five parameters. One parameter for each of these columns: CategoryID, ProductCode, ProductName, ListPrice, and DiscountPercent.

This stored procedure should set the Description column to an empty string, and it should set the DateAdded column to the current date.

If the value for the ListPrice column is a negative number, the stored procedure should raise an error that indicates that this column doesn't accept negative numbers. Similarly, the procedure should raise an error if the value for the DiscountPercent column is a negative number.

Code at least two EXEC statements that test this procedure.

Reference no: EM13166176

Questions Cloud

Calculate the vapor pressure of water inside pressure cooker : the temperature inside a pressure cooker is 111°C. Calculate the vapor pressure of water inside the pressure cooker.
Review of the audit process and timeline : Discussion of business objectives, risks and key processes and review of the audit process and timeline
Java program that implements an algorithm known as a bubble : writing a simple Java program that implements an algorithm known as a Bubble Sort. A Bubble Sort is a simple sorting algorithm that takes an unsorted array of elements and sorts them into ascending order.
Calculate the number of milliliters that must be added : in the titration of 25.00ml of 0.100M CH3COOH, calculate the number of milliliters of 0.200 M NaOH that must be added to reach a pH of a)3.85, b) 5.25,
If the value for the listprice column is a negative number : If the value for the ListPrice column is a negative number, the stored procedure should raise an error that indicates that this column doesn't accept negative numbers. Similarly, the procedure should raise an error if the value for the DiscountPer..
State ammonia and hydrogen chloride gases react : Ammonia and hydrogen chloride gases react to form solid ammonium chloride. A 10.0 L reaction flask contains ammonia at 0.450 atm and 22°C, and 164 mL of hydrogen chloride gas at 7.50 atm and 271 K is introduced
How many grams of co are required to react : Iron (III) oxide reacts with carbon monoxide to form elemental iron and carbon dioxide. How many grams of CO are required to react with 2.78 grams of Fe2O3?
The chief information officer (cio) has outlined : The Chief Information Officer (CIO) has outlined the key requirements for a new network for UMUC. He has explained to the executive board that a new network would have the following characteristics.
Create a method that would search through an arraylist : What is the best way of the following ways (For each, Iterator, While with index) that you would use to create a method that would search through an ArrayList of files for a certain file and then delete it, and why?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Write sql create table statement to create pet table

Write an SQL CREATE TABLE statement to create the PET table without referential integrity constraint on OwnerID in PET.

  Write a pl-sql block

Write a PL/SQ block - Select the average salary of all employees in department number 20.

  Write sql commands to implement profile

Write SQL commands which would implement this profile. Next, write query that would list profile, profile resource name, and limit value for the new profile.

  Write a select statement that returns these columns

Write a SELECT statement that returns these columns from the Products table: The date_added column A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

  Script that creates and calls a stored

Write a script that creates and calls a stored procedure named spInsertProduct that inserts a row into the Products table. This stored procedure should accept five parameters

  Write statement which creates table named part

Write the statement which creates table named Part, with Id field as an int idendity PK, a SupplierId int field, a Description string field of size 25, a Count int field, a Class string field

  Create program to enter first and second number

Create a program that enters first and a second number. The first and second number that will be entered should be computed in halves, quarter, double, and square.

  Write select statement to return those rows with due balance

Write SELECT statement which returns those rows with the balance due greater than 1000. Sort result set by InvoiceTotal, with largest invoice first.

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Write pl-sql block which displays last name

Write PL/SQL block which displays last name and salary of following people. Each of these can be done separately as PL/SQL, first to test and get output lines

  Convert the er/eer model

To represent a problem description given in natural language as an (Enhanced) Entity -Relationship model; to convert the ER/EER model into a relational data model;

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd