I am creating a view in SQL PLUS. The view is using many table. I want to use a create a calculated field based 2 dates fields (one of which is displayed in the view and one that is not).
Right now my calculated field finds the days in between 2 days
max(dateA) - max(dateB) as MyDate
I need to change it to this logic
if(dateA) > (dateB) then
max(dateA) - max(dateB)
I tried using a decode statement but not familiar with complex statement.
Thanks in advance for your help