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

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  You have been asked to design a data model

Law Associates is a large legal practice based in Sydney. You have been asked to design a data model for the practice based upon the following specification

  Trigger named products_insert

Create a trigger named Products_INSERT that inserts the current date for the DateAdded column of the Products table if the value for that column is null. Test this trigger with an appropriate INSERT statement.

  Create student sorting table

Student.txt in the attachment contains the roster of a class. Each student object has the following fields: student id, last name, first name, academic level.Create a RosterClass to store the student database in vector.

  Write sql statement to create stored procedure

Write SQL statement which creates stored procedure with one int input parameter. The stored procedure selects the supplierId field and the total of all Count field values for each group of supplierId's from the Part table.

  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.

  Script that creates and calls a function named

Write a script that creates and calls a function named fnDiscountPrice that calculates the discount price of an item in the OrderItems table (discount amount subtracted from item price). To do that, this function should accept one parameter for th..

  Write a select statement

Write a SELECT statement that returns these columns from the CustomerAddresses view that you created in exercise 1: CustomerID, LastName, FirstName, BillLine1.

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

  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

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