Question
GO CREATE VIEW vwPaymentSummary AS SELECT COUNT(BookingID) AS TotalBookings, CONCAT(FirstName, ' ', LastName) AS CustomerFullName, CustomerEmail, CustomerPhone, StartDate, EndDate, DATEDIFF(dd, StartDate, EndDate) * Rate AS
GO CREATE VIEW vwPaymentSummary AS SELECT COUNT(BookingID) AS TotalBookings, CONCAT(FirstName, ' ', LastName) AS CustomerFullName, CustomerEmail, CustomerPhone, StartDate, EndDate, DATEDIFF(dd, StartDate, EndDate) * Rate AS FullAmount, SUM(DATEDIFF(dd, StartDate, EndDate)) AS TotalPayments FROM Booking AS b JOIN Customer AS c ON b.CustomerID = c.CustomerID;
Msg 8120, Level 16, State 1, Procedure vwPaymentSummary, Line 2 [Batch Start Line 29] Column 'Customer.FirstName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Msg 8120, Level 16, State 1, Procedure vwPaymentSummary, Line 2 [Batch Start Line 29] Column 'Customer.LastName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
How do i fix the errors?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Business Law Text and Cases
Authors: Kenneth W. Clarkson, Roger LeRoy Miller, Gaylord A. Jentz, F
11th Edition
324655223, 978-0324655223
Students also viewed these Databases questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App