Im currently working on a project and the output im looking for, i need to count the number of days between an appointment and operation, currently i have this
Select Patient_FirstName ||' '|| Patient_surname "Patient Name", appointment_date, OPeration_date, datediff(Appointment_Date,Operation_Date) "Days till operation"
from PatientRecord p , Patient b, Appointment a, Operation o
where p.patient_ID = b.Patient_ID
and p.appointment_ID = a.appointment_ID
and p.operation_ID = o.OPeration_ID
order by Patient_Surname;
which is just returning an invalid identifier ,
when i round months it works fine, but i need days
Select Patient_FirstName ||' '|| Patient_surname "Patient Name", appointment_date, OPeration_date, Round (months_between(Appointment_Date,Operation_Date)) "Days till operation"
from PatientRecord p , Patient b, Appointment a, Operation o
where p.patient_ID = b.Patient_ID
and p.appointment_ID = a.appointment_ID
and p.operation_ID = o.OPeration_ID
order by Patient_Surname;
thats what i have for rounding months, is there something similar i can do for days?