Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id, p-name, price,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id, p-name, price, numbers-available) A) Write a function to get the p-id and quantity of 2 different products and returns the total amount for the invoice B) Write a trigger to print the message "Stock is not available" if ordered quantity for one product is more than available numbers Consider the following schema: invoice (i-id, c-id, date, month, year, p-id, quantity, amount) Product(p-id, p-name, price, numbers-available) A) Write a function to get the p-id and quantity of 2 different products and returns the total amount for the invoice B) Write a trigger to print the message "Stock is not available" if ordered quantity for one product is more than available numbers
Expert Answer:
Answer rating: 100% (QA)
A Function to Calculate Total Amount for an Invoice You can write a function in SQL to calculate the ... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-0133428537
13th edition
Authors: Marshall B. Romney, Paul J. Steinbart
Posted Date:
Students also viewed these programming questions
-
The transactions listed below occurred at Jarred Company during 20X1: DATE Mar. 25 July 19 TRANSACTIONS Exchanged a printer (Office Equipment) that had an original cost of $5,320 when purchased on...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Use the figure to make the lists in Exercises 8586. List the slopes m 1 , m 2 , m 3 , and m 4 in order of decreasing size. y y = mx + b y = mx + b X - y = m3x + b3 y = m4x + b4
-
1. During a campaign speech in Chicago on February 5, 2008, Barack Obama said the following: "Change will not come if we wait for some other person or some other time." (Quote by Barack Obama.) (a)...
-
1. Describe the importance of the neutron in atomic nuclei. 2. Describe ray in your own words. 3. Describe a ray in your own words. 4. Describe a ray in your own words. 5. What important discovery...
-
When a solid melts, there is (a) An increase in enthalpy (b) No change in enthalpy (c) A decrease in enthalpy (d) A decrease in internal energy.
-
Records of the Swain New Products Co. show the following data relative to Product M: March 2 Inventory . . . . . . . . . . . . . . . . . . . . . 450 units at $26.00 3 Sale . . . . . . . . . . . . . ....
-
Electronic Arts is contemplating whether its online information webpage should be blue colored or white colored. To answer this question Electronic Arts plans to conduct an A/B test experiment, in...
-
AHPS Pharmaceuticals' marketing team has conducted a $275,000feasibility study to assess the viability of introducing a new painkiller called"No Pain Just Good Dreams." The project is expected to...
-
Suppose you are Samuel Cook, CEO of DeFlava Coffee. DeFlava currently operates in south-eastern Australia, and you are considering opening a factory and sales office in Queensland. What questions do...
-
Thomas received $30,000 in a legal settlement in 2017. The tax treatment of the item is not certain. Thomass research results were ambiguous and he is not sure if the income is taxable. Because some...
-
Suppose your brother, the owner of Muscle Up, a fitness centre, has asked you for a substantial loan to help him expand his business. Required: What would you like to know about Muscle Up before you...
-
Cynthia and Howard, married taxpayers filing a joint return, have $100,000 in taxable income in 2017. They have 4 children (ages 4 through 12) who have no income that is taxable. If they can legally...
-
You work for a global business that manufactures, distributes, installs, and maintains solar water pumps in isolated rural communities. Using the Hofstede Framework and the five dimensions for...
-
A municipal project has been proposed that will require the development of a series of roads. Four proposals are under consideration, all of which have different costs, benefits, and disbenefits. A...
-
Suppose the S&P 500 futures price is 1000, = 30%, r = 5%, = 5%, T = 1, and n = 3. a. What are the prices of European calls and puts for K = $1000? Why do you find the prices to be equal? b. What...
-
Some restaurants use customer checks with pre-numbered sequence codes. Each food server uses these checks to write up customer orders. Food servers are told not to destroy any customer checks; if a...
-
Match the terms with theirdefinitions: 1. Virtual private a. A hash encrypted with the creator's private key network (VPN) Data loss prevention 2. b. A company that issues pairs of public and private...
-
Excel Project a. Expand the cash budget you created in Problem 12.4 to include a row for expected cash outflows equal to 77% of the current months sales. b. Also add a row to calculate the amount of...
-
During the 2002 Winter Olympics in Salt Lake City, Utah, a local microbrewery received a rush order for 100 gallons of beer containing at least 4.0 volume \(\%\) alcohol. Although no \(4 \%\) beer...
-
Willy Wonka has engaged your consultation services to assist in the recipe formulation of a new brand of chocolate bar, weighing \(100 \mathrm{~g}\), which he plans to name "Super-choc." Each...
-
A batch distillation facility has a bank of columns of Type 1 and another bank of Type 2. Type 1 columns are available for processing \(6,000 \mathrm{hr} /\) week, and Type 2 columns are available...
Study smarter with the SolutionInn App