
May 5th, 2004, 01:02 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Create view statement
I have given responses to each question below, but I am not sure if the question A is correct or not. Your help is greatly appreciated
a) Create a view called RepairSummaryNet that shows Customer Name, RepairInvoiceNo and the difference between TotalCost and TotalPaid as the column TotalDue.
b) Is the RepairSummaryNet view updatable? Explain your answer.
c) Show a SQL statement to retrieve the RepairSummaryNet data for those repairs where the amount due is greater than $100. Sort results by TotalDue.
d) Modify the query in (c) so that it uses base tables only.
a)
Create view RepairSummaryNetAS
Select Name, RepairInvoiceNo
From Customer, StoveRepair
Where TotalDue = StoveRepair.TotalCost – StoveRepair.TotalPaid
b)
No, because due to RepairSummaryNet always being updated with new invoices, it is not a consent record in the database.
|