Script below to create an updateable

Assignment Help PL-SQL Programming
Reference no: EM13166912

Use the script below to create an updateable view named balance_due_view. Then, create and test an INSTEAD OF trigger named invoices_instead_of_insert that lets the user update the columns in the view by directly updating the Invoices table. Within this trigger, you can call the stored procedure named insert_invoice that's created by the script for figure 15-5

CREATE OR REPLACE VIEW balance_due_view AS

SELECT vendor_name, invoice_number,

invoice_total, payment_total, credit_total,

invoice_total - payment_total - credit_total AS balance_due

FROM vendors JOIN invoices ON vendors.vendor_id = invoices.vendor_id

WHERE invoice_total - payment_total - credit_total > 0;

Reference no: EM13166912

Questions Cloud

Write a compete pl/sql program to display the staffno : Write a compete PL/SQL program to display the StaffNo,
Commands that you would use to create a 7x7 matrix : Show the unix/linux commands that you would use to create a 7x7 matrix of alternating entries of 1's and 0's. It should look like this
Project that uses interactions to develop the system : on a project that uses interactions to develop the system, in which interation does systems design begin? explain why
What are the formulas for these worst case time complexities : What are the formulas for these Worst Case Time Complexities?
Script below to create an updateable : Use the script below to create an updateable view named balance_due_view. Then, create and test an INSTEAD OF trigger named invoices_instead_of_insert that lets the user update the columns in the view by directly updating the Invoices table.
Asks a user to enter the radius of a circle : Write a program that asks a user to enter the radius of a circle, and calcualtes the area and the circumference. The program should be written using the following methods.
Phil maintains a blog online : Phil maintains a blog online. What do you do to check that his blog is not revealing sensitive company information? Is he allowed to maintain his blog during work hours
Fluid mechanics : Consider a two-dimensional velocity ?eld V~ = aˆi + by2ˆj, where a = 1 m/s and b = 2 m?1s-1
Use numbers 0 through 23 to represent hours : Write a C function seconds_since_jan1() that takes the time as six integer arguments (year, month, day, hour,minute, and second) and returns the number of seconds since the beginning of the year. Use numbers 1 through 12 to represent months. Use numb..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  The cast function to return the date added column

A column that uses the CAST function to return the DateAdded column with its full time only (hour, minutes, seconds, and milliseconds)

  Display the customerid from the orders table

Display the CustomerID from the Orders table and the sum of the associated ItemPrice multiplied by Quantity using Gross Sales (with a space) as the column name from the OrderItems table.

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

  Create a database model

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

  Provide four queries to answer questions asked by end users

Explain how you will go about developing this database. Provide at least four queries that answer some of the questions asked by the end users.

  Script that creates and calls a function

Write a script that creates and calls a function named fnItemTotal that calculates the total amount of an item in the OrderItems table (discount price multiplied by quantity)

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

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  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.

  Convert requirement to logic and then to sql

Prepare the SQL query for each of given requirements. Convert requirement to logic, then to SQL. Illustrate the names of all products which have been sold.

  Display all the lastnames from the customers table

Display all the LastNames from the Customers table and any associated OrdersIDs from the Orders Table. Show the LastName even if they do not have any associated orders. Order the results by LastName in ascending order.

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