I expect it has to do with "Abstract DataType (DATE in this case) semantics". You can subtract a Date from a Date; the result is a number of days (a difference). You can subtract a number of days from a date; the result is a date. That's how your second example gets resolved. In your first example, the implicit order of execution would be ((DATE - DATE) - DATE) which is (#DAYS-DATE) which is not a defined operation for this ADT...
Dr. Michael Ebert DB2 & Oracle Database Administrator aMaDEUS Data Processing Erding / Munich, Germany
<br><font size=2 face="sans-serif">I expect it has to do with "Abstract DataType (DATE in this case) semantics". You can subtract a Date from a Date; the result is a number of days (a difference). You can subtract a number of days from a date; the result is a date. That's how your second example gets resolved. In your first example, the implicit order of execution would be ((DATE - DATE) - DATE) which is (#DAYS-DATE) which is not a defined operation for this ADT...</font> <br> <br><font size=2 face="sans-serif">Dr. Michael Ebert</font> <br><font size=2 face="sans-serif">DB2 & Oracle Database Administrator< /font> <br><font size=2 face="sans-serif">aMaDEUS Data Processing</font> <br><font size=2 face="sans-serif">Erding / Munich, Germany</font> <br>