SQL

1- A SQL statement is needed to create a stored procedure that has one input parameter of data type int. The stored proc selects the supplierId field and the total, or sum, of all Count field values for each group of supplierId fields from the Part table. The Part table was defined in the assignment of week 3. Only rows with their Count total, or sum, greater than the value specified in the input parameter should be returned. Hint: Each returned record has a unique SupplierID value, since we are dealing with groups.

2- A SQL statement is needed to create a stored procedure, which adds a new record to the Part table of week 3. The stored proc returns an out parameter that contains the value of the PartID PK of the record just added. Input parameters are needed to pass the field values of the record to be added. Keep in mind that the PK field in the Part table of week 3 is an idendity field, which SQL Server creates values for. The identity PK field is managed by SQL Server.

3- A SQL statement that creates a user defined function that returns an int value is needed. This int return value is obtained by deducting the lowest Count field value from the highest Count field value of the Part table. You should enter sample test records in the Part table for testing this function in SQL Server.

4- An Update trigger on the Part table is needed, which raises an error string if the Count field of the updated row has a higher value than the value prior to the Update. In other words, the new value cannot be larger than the older value. If the trigger fires and after the error string is displayed, the Update operation should be rolled back. The exact text of the error string is up to you to define.

  1. 👍
  2. 👎
  3. 👁
  1. If you are working on PL/SQL (from Oracle), you can specify it.

    In addition, you need to specify what your proposed solution is, and what difficulties you are encountering.

    To be able to help you, we also need the specifications of the Part Table, name/type of the fields, size, etc.

    1. 👍
    2. 👎
  2. MrMath, please do not post any answers to this question. My daughter, thinking she would help me with homework posted this. I appreciate your time but do not need any assistance as I have a good understanding of the material. I have asked the site to delete this post. Sorry for wasting your time.

    1. 👍
    2. 👎
  3. ok, no problem.

    1. 👍
    2. 👎
  4. Thank you sir:)

    1. 👍
    2. 👎

Respond to this Question

First Name

Your Response

Similar Questions

  1. English

    I have to write an essay on the lack of proper nutrition. This is my introduction paragraph so far: The Lack of Proper Nutrition Roughly three-fourths of the world’s population has an eating lifestyle that is very low in

  2. Algebra/Precalculus

    Solve the system of linear equations and check any solutions algebraically. (If there is no solution, enter NO SOLUTION. If the system is dependent, express x, y, and z in terms of the parameter a.) 3x-3y+6z=6 x+2y-z=8 5x-8y+13z=4

  3. Math

    Hey, I need your help! I have an input output table that I need the function rule for. The table is like this: Input: 0 Output: 25 Input: 100 Output: 35 Input: 200 Output: 45 Input: 300 Output: 55 Input: 400 Output: 65 PLEASE I

  4. programming concepts

    Input a list of employee names and salaries stored in parallel arrays. The sal-aries should be floating point numbers in increments of 100. For example, a salary of $ 36,000 should be input as 36.0 and a salary of $ 85,900 should

  1. math

    The weights and heights of six mathematics students are given in the following table: Weight (in pounds) Height (in centimeters) 165 172 123 157 212 183 175 178 165 163 147 167 In the statement, "Height is a function of weight,"

  2. c programming

    Write a program to read from a file called "input.txt" information about 5 workers. Each line would contain two values respectively, an employee ID and the employee's monthly salary. Assume that the data from the input file is

  3. Computer Science - MATLAB

    One interesting property of a Fibonacci sequence is that the ratio of the values of adjacent members of the sequence approach a number called “the golden ratio” or PHI. Create a program that accepts the first two numbers of a

  4. Physics

    A hydraulic jack has an input piston that is 1.2 cm2 in area and an output piston that is 144 cm2 in area. How much input or effort force in newtons is needed to lift a car that weighs 25,000 newtons?

  1. programming in BASICS

    1. The result of computations done in a -----statement are not stored in the computer's memory. A.LET; B. PRINT; C. compute; D. PRINT USING. 2. which of the following statements may appear anywhere you need them in a program, and

  2. science

    I don't fully understand this could you help? In this section, you will create a step-by-step procedure for testing and monitoring the number of trout and catfish in Cypress Pond. You must monitor them once per month for 12 months

  3. computer science

    write a program that calculates a customer's monthly bill. it should input customer name, which package the customer has purchased, and how many hours were used. it should then create a bill that includes the input informtion and

  4. calculus

    find the equation of the tangent line to the curve at the given point by eliminating the parameter: x=1+sqrt(t) y=e^(t^2) parameter: (2,e)

You can view more similar questions or ask a new question.