Im trying to run the following SQL in Oracle: SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeCharged FROM FEE_KR JOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceID JOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestID WHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee Description') WHERE ServiceName NOT IN (SELECT FEETYPE FROM REPORT_FILTER_KR) GROUP BY GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged ORDER BY SUM(FeeCharged) DESC; And I'm recieving this error: Error starting at line : 1 in command - SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeCharged FROM FEE_KR JOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceID JOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestID WHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee Description') WHERE ServiceName NOT IN (SELECT FEETYPE FROM REPORT_FILTER_KR) GROUP BY GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged ORDER BY SUM(FeeCharged) DESC Error at Command Line : 6 Column : 1 Error report - SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" *Cause: *Action: How do I fix this?
Im trying to run the following SQL in Oracle:
SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeCharged
FROM FEE_KR
JOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceID
JOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestID
WHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee Description')
WHERE ServiceName NOT IN (SELECT FEETYPE FROM REPORT_FILTER_KR)
GROUP BY GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged
ORDER BY SUM(FeeCharged) DESC;
And I'm recieving this error:
Error starting at line : 1 in command -
SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeCharged
FROM FEE_KR
JOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceID
JOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestID
WHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee Description')
WHERE ServiceName NOT IN (SELECT FEETYPE FROM REPORT_FILTER_KR)
GROUP BY GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged
ORDER BY SUM(FeeCharged) DESC
Error at Command Line : 6 Column : 1
Error report -
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
How do I fix this?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps