The reason the . didn't work is because SAS uses different representations for Oracle's NULL; . for numeric variables, blank for character. This is a really old feature of the SAS language. On the subject of your filter, dates with DBMS tables can be tricky, as different DBMS products represent them differently. DATETIME() is a SAS function that might work. If not, try posting to the "SAS Macro Facility, Data Step and SAS Language Elements" community; someone with more Oracle experience can probably help. Do you need your filtering statements in the actual MAX(CASE(...)) statements, or can you use a filter on the "Filter Data" tab in your EG query?
... View more