Hi, mrainer Looking at your request, I believe your question pertains completely to the SQL syntax for DB2. Based on this, I suggest that you pursue this with IBM and Oracle. While SAS users connect to DB2 and Oracle, we aren't necessarily experts on the implications of the SQL dialects that they provide. I think that your best course of action is to get your query working in native Oracle, and then using it with SAS should be very straightforward. Tom
... View more