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

  Write sql statement-display major of student-no duplications

Write a SQL statement to display the Major of the student with no duplications. Write a SQL statement to display the First and Last name of students who live in the Zip code 88888.

  Create a pl-sql block using the hr schema

Create a PL/SQL block to achieve the following using the HR schema and select the name, salary, and department of the employee with the maximum salary.

  Write a pl-sql block

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

  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.

  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;

  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."

  Write a perl subroutine for temperature conversion

Write a perl subroutine for temperature conversion named 'convert_temp'. It should be able to handle both Fahrenheit to Celsius conversions as well as Celsius to Fahrenheit conversions.

  F does not logically imply

Given R = (J,K,L ) and the set F of FDs J -> K and L -> K , show that F does NOT logically

  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 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 report to display scr courses in alphabetical order

Create the detail report which will display all SCR courses in alphabetical order, with a course name and instructor name in the group header.

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