LPS-43215

CAST_TEXT causes errors with Oracle due to comparison with a CLOB and VARCHAR(4000) if value has more than 4000 characters. 

Consulted with Minhchau and was told that CAST_TEXT isn't really required for the query. Made syntax changes and tested on both Master & ee-6.2.x, the upgrade was successful after the change.