When you query a database management system (DBMS) table via a LIBNAME engine, using a SAS® data set option might disable implicit pass-through processing. When this occurs, the query might take longer than if it had been able to pass it to the DBMS to be processed there. When you run the query with the SASTRACE system option enabled, attempts with invalid syntax might be seen. When you break up the query, these invalid queries might occur, but they do not stop the query from running. SAS attempts a different query until it finds one that is valid. After retrieving the results from the DBMS, SAS processes any part of the query that was not passed to the DBMS.
There are currently no workarounds for this behavior.