Write a script that declares a variable

Assignment Help PL-SQL Programming
Reference no: EM13166104

Write a script that declares a variable and sets it to the count of all products in the Products table. If the count is greater than or equal to 7, the script should display a message that says, "The number of products is greater than or equal to 7". Otherwise, it should say, "The number of products is less than 7".

2. Write a script that uses two variables to store (1) the count of all of the products in the Products table and (2) the average list price for those products. If the product count is greater than or equal to 7, the script should print a message that displays the values of both variables. Otherwise, the script should print a message that says, "The number of products is less than 7".
3. Write a script that calculates the common factors between 10 and 20. To find a common factor, you can use the modulo operator (%) to check whether a number can be evenly divided into both numbers. Then, this script should print lines that display the common factors like this:
Common factors of 10 and 20
1
2
5
4. Write a script that attempts to insert a new category named "Guitars" into the Categories table. If the insert is successful, the script should display this message:
SUCCESS: Record was inserted.
If the update is unsuccessful, the script should display a message something like this:
FAILURE: Record was not inserted.
Error 2627: Violation of UNIQUE KEY constraint 'UQ__Categori__8517B2E0A87CE853'. Cannot insert duplicate key in object 'dbo.Categories'. The duplicate key value is (Guitars).

Reference no: EM13166104

Questions Cloud

Swing gui to translate test this is input in english : Design and code a SWING GUI to translate test this is input in English into Pig Latin.You can assume that the sentence contains no punctuation. The rules for Pig Latin are
State draw the fischer projection of the enantiomer : Draw the Fischer projection of the enantiomer of (4S, 5S)-5-sec-butyl-4-(1,1-difluoromethyl)nonane
What is the vapor pressure of the stored mixture : The solvent for an organic reaction is prepared by mixing 60.0 of acetone () with 56.0 of ethyl acetate (). This mixture is stored at 25.0 . The vapor pressure and the densities for the two pure components at 25.0. What is the vapor pressure of th..
Write a c++ program to draw the five olympic rings : Write a C++ program to draw the five Olympic rings. Make the circles have a thickness of 5 pixel
Write a script that declares a variable : Write a script that declares a variable and sets it to the count of all products in the Products table. If the count is greater than or equal to 7, the script should display a message that says,
Allow different payment and shipping options : allow different payment and shipping options. There are a plenty of examples of this kind of web sites. Some well-known ones are amazon.com, Barnes & Nobles, and Borders.
How does one ensure that a cost-management system : Toni is relying on financial feedback, and the product costing method adopted by the large bakery. What are the strengths and weaknesses of these approaches?
Demand-paged environment : Which of the following programming techniques and data structures (in a user-level program) are good for a demand-paged environment, and which are bad? Explain your answer.
State what temperature should cool the air : If you want to remove 50% of the moisture in the air at a constant pressure of 100 kPa, to what temperature should you cool the air.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  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.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write sql statement to produce single column

Write an SQL statement to produce a single column called ItemLocation that combines the SKU_Description,the phrase "is located in."

  Write pl-sql block to display the last name of people

Write a PL/SQL block that displays the last name and salary of the following people. Each of these can be done separately as PL/SQL, first to test and get the output lines then encapsulated in the procedure.

  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)

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  An er diagram for the system

An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

  Stored procedure named spinsertcategory

Write a script that creates and calls a stored procedure named spInsertCategory. First, code a statement that creates a procedure that adds a new row to the Categories table. To do that

  Write queries in sql and relational algebra

Write given queries in SQL and relational algebra: Determine cities from which one can fly to Toronto with one change of planes, and using same type of the aircraft for both legs of trip.

  Write a pl/sql block and declare a variable v_sal

Write a PL/SQL block and declare a variable  v_sal  of the type NUMBER. Include the following statement in the Execution section:

  Create report using wizard or based on sql query

Create a report using the wizard or based on an SQL query that that shows Courses that instructors are approved to teach. Show Course Number, First Name, and Last Name of Instructor.

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