SQL does not allow <str> on sorted streams Explanation: You have used MODIFY or ERASE on a stream whose record selection expression contains a SORTED BY clause. SQL does not permit its equivalent of MODIFY (UPDATE) and ERASE (DELETE) to operate on ordered streams as these are considered read only. User Action: Rewrite your code so it does not attempt to modify or erase from these relations.