![](/uploads/1/2/5/6/125663127/335691638.jpeg)
Hello,
![Form Form](http://logic.edchen.org/wp-content/uploads/2/2019/03/sql-developer-editor-autocomplete-column-name.png)
SHIPDATE, DATEDIFF ( DAY, ORDERS.ORDERDATE, ORDERS.SHIPDATE) FROM ORDERS. But it comes out with Invalid Identifier - Where am I going wrong.
I need some help with converting this SQL expression into Oracle. Tthe error message in this expression is:ORA-00904: 'DATEADD': invalid identifier and I don't understand what that means. This is a filter in report studio. I don't know what the Oracle function is for DATEADD. Can someone please help me to convert this into the Oracle function.
DATEADD({day}, 0, DATEDIFF({day}, 0, [Acceptance Date])) >= DATEADD({day}, 0, DATEDIFF({day}, 0, [FHASLEXT].[As Of Date]))
I appreciate your support and guidance.
Thanks, aka2d7
SELECT Trainee_TBL.LastName,
Trainee_TBL.FirstName,
Apt_Building_TBL.BuildingName,
Apt_TBL.AptNumber,
Apt_Type_TBL.ApartmentType,
Apt_Type_TBL.PricePerNight,
Apt_Rental_TBL.CheckInDate,
Apt_Rental_TBL.CheckOutDate,
DATEDIFF(d,Apt_Rental_TBL.CheckInDate,Apt_Rental_TBL.CheckOutDate)*(PricePerNight-(ContractDiscount*100)) AS Total
FROM Employer_TBL INNER JOIN Trainee_TBL
ON Employer_TBL.EmployerID = Trainee_TBL.EmployerID
INNER JOIN Apt_Rental_TBL
ON Trainee_TBL.TraineeID = Apt_Rental_TBL.TraineeID
INNER JOIN Apt_TBL
ON Apt_TBL.AptID = Apt_Rental_TBL.AptID
INNER JOIN Apt_Type_TBL
ON Apt_Type_TBL.AptTypeID = Apt_TBL.AptTypeID
INNER JOIN Apt_Building_TBL
ON Apt_Building_TBL.BuildingID = Apt_TBL.BuildingID;
![Identifier Identifier](/uploads/1/2/5/6/125663127/378857651.jpg)
If I leave out the DATEDIFF line then this works. I want the datediff to calculate the number of days for a stay and then do the calculation for the cost. What am I doing wrong?
![](/uploads/1/2/5/6/125663127/335691638.jpeg)